@resolution/jira-api-client 0.1.0 → 0.1.2
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/CHANGELOG.md +22 -0
- package/package.json +10 -3
- package/.eslintrc.js +0 -3
- package/config/api-typescript-generator.config.ts +0 -91
- package/config/compare-schemas.ts +0 -307
- package/src/index.ts +0 -47
- package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
- package/src/openapi/platform/core/common-http-client.ts +0 -723
- package/src/openapi/platform/core/common-http-service.ts +0 -22
- package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/platform/models/announcement-banner.ts +0 -59
- package/src/openapi/platform/models/app-data-policies.ts +0 -79
- package/src/openapi/platform/models/app-migration.ts +0 -172
- package/src/openapi/platform/models/app-properties.ts +0 -32
- package/src/openapi/platform/models/audit-records.ts +0 -140
- package/src/openapi/platform/models/avatars.ts +0 -48
- package/src/openapi/platform/models/classification-levels.ts +0 -58
- package/src/openapi/platform/models/common.ts +0 -2669
- package/src/openapi/platform/models/dashboards.ts +0 -849
- package/src/openapi/platform/models/dynamic-modules.ts +0 -121
- package/src/openapi/platform/models/filter-sharing.ts +0 -103
- package/src/openapi/platform/models/filters.ts +0 -319
- package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
- package/src/openapi/platform/models/groups.ts +0 -247
- package/src/openapi/platform/models/issue-attachments.ts +0 -290
- package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
- package/src/openapi/platform/models/issue-comments.ts +0 -91
- package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
- package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
- package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
- package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
- package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
- package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
- package/src/openapi/platform/models/issue-fields.ts +0 -392
- package/src/openapi/platform/models/issue-link-types.ts +0 -28
- package/src/openapi/platform/models/issue-links.ts +0 -185
- package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
- package/src/openapi/platform/models/issue-priorities.ts +0 -196
- package/src/openapi/platform/models/issue-properties.ts +0 -259
- package/src/openapi/platform/models/issue-remote-links.ts +0 -207
- package/src/openapi/platform/models/issue-resolutions.ts +0 -180
- package/src/openapi/platform/models/issue-search.ts +0 -367
- package/src/openapi/platform/models/issue-security-level.ts +0 -76
- package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
- package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
- package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
- package/src/openapi/platform/models/issue-types.ts +0 -66
- package/src/openapi/platform/models/issue-votes.ts +0 -38
- package/src/openapi/platform/models/issue-watchers.ts +0 -67
- package/src/openapi/platform/models/issue-worklogs.ts +0 -190
- package/src/openapi/platform/models/issues.ts +0 -1268
- package/src/openapi/platform/models/jira-expressions.ts +0 -578
- package/src/openapi/platform/models/jira-settings.ts +0 -118
- package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
- package/src/openapi/platform/models/jql.ts +0 -783
- package/src/openapi/platform/models/labels.ts +0 -42
- package/src/openapi/platform/models/license-metrics.ts +0 -68
- package/src/openapi/platform/models/myself.ts +0 -29
- package/src/openapi/platform/models/permission-schemes.ts +0 -89
- package/src/openapi/platform/models/permissions.ts +0 -308
- package/src/openapi/platform/models/priority-schemes.ts +0 -527
- package/src/openapi/platform/models/project-avatars.ts +0 -29
- package/src/openapi/platform/models/project-classification-levels.ts +0 -24
- package/src/openapi/platform/models/project-components.ts +0 -231
- package/src/openapi/platform/models/project-email.ts +0 -27
- package/src/openapi/platform/models/project-features.ts +0 -78
- package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
- package/src/openapi/platform/models/project-role-actors.ts +0 -107
- package/src/openapi/platform/models/project-roles.ts +0 -76
- package/src/openapi/platform/models/project-types.ts +0 -36
- package/src/openapi/platform/models/project-versions.ts +0 -216
- package/src/openapi/platform/models/projects.ts +0 -429
- package/src/openapi/platform/models/screen-schemes.ts +0 -192
- package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
- package/src/openapi/platform/models/screens.ts +0 -171
- package/src/openapi/platform/models/server-info.ts +0 -100
- package/src/openapi/platform/models/service-registry.ts +0 -68
- package/src/openapi/platform/models/status.ts +0 -229
- package/src/openapi/platform/models/time-tracking.ts +0 -38
- package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
- package/src/openapi/platform/models/user-search.ts +0 -69
- package/src/openapi/platform/models/users.ts +0 -121
- package/src/openapi/platform/models/webhooks.ts +0 -307
- package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
- package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
- package/src/openapi/platform/models/workflow-schemes.ts +0 -545
- package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
- package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
- package/src/openapi/platform/models/workflows.ts +0 -1943
- package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
- package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
- package/src/openapi/platform/services/app-migration-service.ts +0 -289
- package/src/openapi/platform/services/app-properties-service.ts +0 -441
- package/src/openapi/platform/services/application-roles-service.ts +0 -247
- package/src/openapi/platform/services/audit-records-service.ts +0 -164
- package/src/openapi/platform/services/avatars-service.ts +0 -769
- package/src/openapi/platform/services/classification-levels-service.ts +0 -131
- package/src/openapi/platform/services/dashboards-service.ts +0 -1721
- package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
- package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
- package/src/openapi/platform/services/filters-service.ts +0 -1901
- package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
- package/src/openapi/platform/services/groups-service.ts +0 -751
- package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
- package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
- package/src/openapi/platform/services/issue-comments-service.ts +0 -812
- package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
- package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
- package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
- package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
- package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
- package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
- package/src/openapi/platform/services/issue-fields-service.ts +0 -837
- package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
- package/src/openapi/platform/services/issue-links-service.ts +0 -345
- package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
- package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
- package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
- package/src/openapi/platform/services/issue-properties-service.ts +0 -606
- package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
- package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
- package/src/openapi/platform/services/issue-search-service.ts +0 -1139
- package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
- package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
- package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
- package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
- package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
- package/src/openapi/platform/services/issue-types-service.ts +0 -679
- package/src/openapi/platform/services/issue-votes-service.ts +0 -221
- package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
- package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
- package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
- package/src/openapi/platform/services/issues-service.ts +0 -3346
- package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
- package/src/openapi/platform/services/jira-settings-service.ts +0 -415
- package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
- package/src/openapi/platform/services/jql-service.ts +0 -896
- package/src/openapi/platform/services/labels-service.ts +0 -89
- package/src/openapi/platform/services/license-metrics-service.ts +0 -216
- package/src/openapi/platform/services/myself-service.ts +0 -520
- package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
- package/src/openapi/platform/services/permissions-service.ts +0 -407
- package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
- package/src/openapi/platform/services/project-avatars-service.ts +0 -341
- package/src/openapi/platform/services/project-categories-service.ts +0 -318
- package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
- package/src/openapi/platform/services/project-components-service.ts +0 -1332
- package/src/openapi/platform/services/project-email-service.ts +0 -161
- package/src/openapi/platform/services/project-features-service.ts +0 -207
- package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
- package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
- package/src/openapi/platform/services/project-properties-service.ts +0 -320
- package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
- package/src/openapi/platform/services/project-roles-service.ts +0 -867
- package/src/openapi/platform/services/project-types-service.ts +0 -297
- package/src/openapi/platform/services/project-versions-service.ts +0 -1287
- package/src/openapi/platform/services/projects-service.ts +0 -2196
- package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
- package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
- package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
- package/src/openapi/platform/services/screens-service.ts +0 -528
- package/src/openapi/platform/services/server-info-service.ts +0 -88
- package/src/openapi/platform/services/service-registry-service.ts +0 -89
- package/src/openapi/platform/services/status-service.ts +0 -498
- package/src/openapi/platform/services/tasks-service.ts +0 -159
- package/src/openapi/platform/services/time-tracking-service.ts +0 -386
- package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
- package/src/openapi/platform/services/user-properties-service.ts +0 -413
- package/src/openapi/platform/services/user-search-service.ts +0 -1214
- package/src/openapi/platform/services/users-service.ts +0 -1108
- package/src/openapi/platform/services/webhooks-service.ts +0 -458
- package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
- package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
- package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
- package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
- package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
- package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
- package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
- package/src/openapi/platform/services/workflows-service.ts +0 -3477
- package/src/openapi/platform/validation-schema-storage.ts +0 -186
- package/src/openapi/software/base-jira-software-api-client.ts +0 -447
- package/src/openapi/software/core/common-http-client.ts +0 -723
- package/src/openapi/software/core/common-http-service.ts +0 -22
- package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/software/models/board.ts +0 -918
- package/src/openapi/software/services/backlog-service.ts +0 -160
- package/src/openapi/software/services/board-service.ts +0 -4189
- package/src/openapi/software/services/builds-service.ts +0 -571
- package/src/openapi/software/services/deployments-service.ts +0 -403
- package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
- package/src/openapi/software/services/development-information-service.ts +0 -2357
- package/src/openapi/software/services/epic-service.ts +0 -854
- package/src/openapi/software/services/feature-flags-service.ts +0 -303
- package/src/openapi/software/services/issue-service.ts +0 -529
- package/src/openapi/software/services/operations-service.ts +0 -741
- package/src/openapi/software/services/remote-links-service.ts +0 -653
- package/src/openapi/software/services/security-information-service.ts +0 -495
- package/src/openapi/software/services/sprint-service.ts +0 -969
- package/src/openapi/software/validation-schema-storage.ts +0 -186
- package/tsconfig.build.json +0 -7
- package/tsconfig.json +0 -4
|
@@ -1,1139 +0,0 @@
|
|
|
1
|
-
// DO NOT EDIT!
|
|
2
|
-
// This file is generated by "api-typescript-generator".
|
|
3
|
-
// To update this file run "yarn build:openapi".
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
import * as commonHttpClient from "../core/common-http-client";
|
|
7
|
-
import { CommonHttpService } from "../core/common-http-service";
|
|
8
|
-
import {
|
|
9
|
-
type IdSearchRequestBean,
|
|
10
|
-
type IdSearchResults,
|
|
11
|
-
type IssueMatches,
|
|
12
|
-
type IssuePickerSuggestions,
|
|
13
|
-
type IssuesAndJqlQueries,
|
|
14
|
-
registerIssueSearchValidationSchemas,
|
|
15
|
-
type SearchRequestBean,
|
|
16
|
-
type SearchResults,
|
|
17
|
-
} from "../models/issue-search";
|
|
18
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
19
|
-
/**
|
|
20
|
-
* This resource represents various ways to search for issues. Use it to search
|
|
21
|
-
* for issues with a JQL query and find issues to populate an issue picker.
|
|
22
|
-
*/
|
|
23
|
-
export class IssueSearchService extends CommonHttpService {
|
|
24
|
-
/**
|
|
25
|
-
* Returns lists of issues matching a query string. Use this resource to provide
|
|
26
|
-
* auto-completion suggestions when the user is looking for an issue using a word
|
|
27
|
-
* or string.
|
|
28
|
-
*
|
|
29
|
-
* This operation returns two lists:
|
|
30
|
-
*
|
|
31
|
-
* * `History Search` which includes issues from the user's history of created,
|
|
32
|
-
* edited, or viewed issues that contain the string in the `query` parameter.
|
|
33
|
-
* * `Current Search` which includes issues that match the JQL expression in
|
|
34
|
-
* `currentJQL` and contain the string in the `query` parameter.
|
|
35
|
-
*
|
|
36
|
-
* This operation can be accessed anonymously.
|
|
37
|
-
*
|
|
38
|
-
* **[Permissions](#permissions) required:** None.
|
|
39
|
-
*
|
|
40
|
-
* @returns Returned if the request is successful.
|
|
41
|
-
* @path {GET} /rest/api/3/issue/picker
|
|
42
|
-
* @scopes-current read:jira-work
|
|
43
|
-
* @scopes-beta read:issue-details:jira
|
|
44
|
-
*/
|
|
45
|
-
getIssuePickerResource({
|
|
46
|
-
query,
|
|
47
|
-
currentJql,
|
|
48
|
-
currentIssueKey,
|
|
49
|
-
currentProjectId,
|
|
50
|
-
showSubTasks,
|
|
51
|
-
showSubTaskParent,
|
|
52
|
-
}: {
|
|
53
|
-
/**
|
|
54
|
-
* A string to match against text fields in the issue such as title, description,
|
|
55
|
-
* or comments.
|
|
56
|
-
*/
|
|
57
|
-
query?: string;
|
|
58
|
-
/**
|
|
59
|
-
* A JQL query defining a list of issues to search for the query term. Note that
|
|
60
|
-
* `username` and `userkey` cannot be used as search terms for this parameter, due
|
|
61
|
-
* to privacy reasons. Use `accountId` instead.
|
|
62
|
-
*/
|
|
63
|
-
currentJql?: string;
|
|
64
|
-
/**
|
|
65
|
-
* The key of an issue to exclude from search results. For example, the issue the
|
|
66
|
-
* user is viewing when they perform this query.
|
|
67
|
-
*/
|
|
68
|
-
currentIssueKey?: string;
|
|
69
|
-
/** The ID of a project that suggested issues must belong to. */
|
|
70
|
-
currentProjectId?: string;
|
|
71
|
-
/** Indicate whether to include subtasks in the suggestions list. */
|
|
72
|
-
showSubTasks?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* When `currentIssueKey` is a subtask, whether to include the parent issue in the
|
|
75
|
-
* suggestions if it matches the query.
|
|
76
|
-
*/
|
|
77
|
-
showSubTaskParent?: boolean;
|
|
78
|
-
}): Promise<IssuePickerSuggestions> {
|
|
79
|
-
return this.getClientInstance()
|
|
80
|
-
.request({
|
|
81
|
-
path: "/rest/api/3/issue/picker",
|
|
82
|
-
method: "GET",
|
|
83
|
-
query: {
|
|
84
|
-
query,
|
|
85
|
-
currentJQL: currentJql,
|
|
86
|
-
currentIssueKey,
|
|
87
|
-
currentProjectId,
|
|
88
|
-
showSubTasks,
|
|
89
|
-
showSubTaskParent,
|
|
90
|
-
},
|
|
91
|
-
})
|
|
92
|
-
.then(
|
|
93
|
-
this.getClientInstance().responseHandler({
|
|
94
|
-
200: {
|
|
95
|
-
"application/json": "json",
|
|
96
|
-
},
|
|
97
|
-
}),
|
|
98
|
-
)
|
|
99
|
-
.then(
|
|
100
|
-
commonHttpClient.castResponse<{
|
|
101
|
-
status: 200;
|
|
102
|
-
mediaType: "application/json";
|
|
103
|
-
body: IssuePickerSuggestions;
|
|
104
|
-
}>(),
|
|
105
|
-
)
|
|
106
|
-
.then(
|
|
107
|
-
validationSchemaStorage.validator(
|
|
108
|
-
"IssueSearchService.getIssuePickerResource.response",
|
|
109
|
-
),
|
|
110
|
-
)
|
|
111
|
-
.then(commonHttpClient.getBody);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Checks whether one or more issues would be returned by one or more JQL queries.
|
|
115
|
-
*
|
|
116
|
-
* **[Permissions](#permissions) required:** None, however, issues are only
|
|
117
|
-
* matched against JQL queries where the user has:
|
|
118
|
-
*
|
|
119
|
-
* * *Browse projects* [project
|
|
120
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
121
|
-
* issue is in.
|
|
122
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
123
|
-
* configured, issue-level security permission to view the issue.
|
|
124
|
-
*
|
|
125
|
-
* @returns Returned if the request is successful.
|
|
126
|
-
*
|
|
127
|
-
* example: {
|
|
128
|
-
* "matches": [
|
|
129
|
-
* {
|
|
130
|
-
* "matchedIssues": [
|
|
131
|
-
* 10000,
|
|
132
|
-
* 10004
|
|
133
|
-
* ],
|
|
134
|
-
* "errors": []
|
|
135
|
-
* },
|
|
136
|
-
* {
|
|
137
|
-
* "matchedIssues": [
|
|
138
|
-
* 100134,
|
|
139
|
-
* 10025,
|
|
140
|
-
* 10236
|
|
141
|
-
* ],
|
|
142
|
-
* "errors": []
|
|
143
|
-
* },
|
|
144
|
-
* {
|
|
145
|
-
* "matchedIssues": [],
|
|
146
|
-
* "errors": []
|
|
147
|
-
* },
|
|
148
|
-
* {
|
|
149
|
-
* "matchedIssues": [],
|
|
150
|
-
* "errors": [
|
|
151
|
-
* "Invalid JQL: broken = value"
|
|
152
|
-
* ]
|
|
153
|
-
* }
|
|
154
|
-
* ]
|
|
155
|
-
* }
|
|
156
|
-
* @path {POST} /rest/api/3/jql/match
|
|
157
|
-
* @scopes-current read:jira-work
|
|
158
|
-
* @scopes-beta read:issue-details:jira
|
|
159
|
-
*/
|
|
160
|
-
matchIssues({
|
|
161
|
-
issuesAndJqlQueries,
|
|
162
|
-
}: {
|
|
163
|
-
/**
|
|
164
|
-
* @example {
|
|
165
|
-
* "issueIds": [
|
|
166
|
-
* 10001,
|
|
167
|
-
* 1000,
|
|
168
|
-
* 10042
|
|
169
|
-
* ],
|
|
170
|
-
* "jqls": [
|
|
171
|
-
* "project = FOO",
|
|
172
|
-
* "issuetype = Bug",
|
|
173
|
-
* "summary ~ \"some text\" AND project in (FOO, BAR)"
|
|
174
|
-
* ]
|
|
175
|
-
* }
|
|
176
|
-
*/
|
|
177
|
-
issuesAndJqlQueries: IssuesAndJqlQueries;
|
|
178
|
-
}): Promise<IssueMatches> {
|
|
179
|
-
return this.getClientInstance()
|
|
180
|
-
.request({
|
|
181
|
-
path: "/rest/api/3/jql/match",
|
|
182
|
-
method: "POST",
|
|
183
|
-
headers: {
|
|
184
|
-
"Content-Type": "application/json",
|
|
185
|
-
},
|
|
186
|
-
body: issuesAndJqlQueries,
|
|
187
|
-
})
|
|
188
|
-
.then(
|
|
189
|
-
this.getClientInstance().responseHandler({
|
|
190
|
-
200: {
|
|
191
|
-
"application/json": "json",
|
|
192
|
-
},
|
|
193
|
-
}),
|
|
194
|
-
)
|
|
195
|
-
.then(
|
|
196
|
-
commonHttpClient.castResponse<{
|
|
197
|
-
status: 200;
|
|
198
|
-
mediaType: "application/json";
|
|
199
|
-
body: IssueMatches;
|
|
200
|
-
}>(),
|
|
201
|
-
)
|
|
202
|
-
.then(
|
|
203
|
-
validationSchemaStorage.validator(
|
|
204
|
-
"IssueSearchService.matchIssues.response",
|
|
205
|
-
),
|
|
206
|
-
)
|
|
207
|
-
.then(commonHttpClient.getBody);
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Searches for IDs of issues using
|
|
211
|
-
* [JQL](https://confluence.atlassian.com/x/egORLQ).
|
|
212
|
-
*
|
|
213
|
-
* Use the [Search](#api-rest-api-3-search-post) endpoint if you need to fetch
|
|
214
|
-
* more than just issue IDs. The Search endpoint returns more information, but may
|
|
215
|
-
* take much longer to respond to requests. This is because it uses a different
|
|
216
|
-
* mechanism for ordering results than this endpoint and doesn't provide the total
|
|
217
|
-
* number of results for your query.
|
|
218
|
-
*
|
|
219
|
-
* This operation can be accessed anonymously.
|
|
220
|
-
*
|
|
221
|
-
* **[Permissions](#permissions) required:** Issues are included in the response
|
|
222
|
-
* where the user has:
|
|
223
|
-
*
|
|
224
|
-
* * *Browse projects* [project
|
|
225
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
226
|
-
* containing the issue.
|
|
227
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
228
|
-
* configured, issue-level security permission to view the issue.
|
|
229
|
-
*
|
|
230
|
-
* @returns Returned if the request is successful.
|
|
231
|
-
*
|
|
232
|
-
* example: {
|
|
233
|
-
* "issueIds": [
|
|
234
|
-
* 10000,
|
|
235
|
-
* 10001,
|
|
236
|
-
* 10002
|
|
237
|
-
* ],
|
|
238
|
-
* "nextPageToken": "EgQIlMIC"
|
|
239
|
-
* }
|
|
240
|
-
* @path {POST} /rest/api/3/search/id
|
|
241
|
-
* @scopes-current read:jira-work
|
|
242
|
-
* @scopes-beta read:issue-details:jira, read:field.default-value:jira, read:field.option:jira,
|
|
243
|
-
* read:field:jira, read:group:jira
|
|
244
|
-
*/
|
|
245
|
-
searchForIssuesIds({
|
|
246
|
-
idSearchRequestBean,
|
|
247
|
-
}: {
|
|
248
|
-
/**
|
|
249
|
-
* A JSON object containing the search request.
|
|
250
|
-
*
|
|
251
|
-
* @example {
|
|
252
|
-
* "jql": "project = HSP",
|
|
253
|
-
* "maxResults": 1000,
|
|
254
|
-
* "nextPageToken": "EgQIlMIC"
|
|
255
|
-
* }
|
|
256
|
-
*/
|
|
257
|
-
idSearchRequestBean: IdSearchRequestBean;
|
|
258
|
-
}): Promise<IdSearchResults> {
|
|
259
|
-
return this.getClientInstance()
|
|
260
|
-
.request({
|
|
261
|
-
path: "/rest/api/3/search/id",
|
|
262
|
-
method: "POST",
|
|
263
|
-
headers: {
|
|
264
|
-
"Content-Type": "application/json",
|
|
265
|
-
},
|
|
266
|
-
body: idSearchRequestBean,
|
|
267
|
-
})
|
|
268
|
-
.then(
|
|
269
|
-
this.getClientInstance().responseHandler({
|
|
270
|
-
200: {
|
|
271
|
-
"application/json": "json",
|
|
272
|
-
},
|
|
273
|
-
}),
|
|
274
|
-
)
|
|
275
|
-
.then(
|
|
276
|
-
commonHttpClient.castResponse<{
|
|
277
|
-
status: 200;
|
|
278
|
-
mediaType: "application/json";
|
|
279
|
-
body: IdSearchResults;
|
|
280
|
-
}>(),
|
|
281
|
-
)
|
|
282
|
-
.then(
|
|
283
|
-
validationSchemaStorage.validator(
|
|
284
|
-
"IssueSearchService.searchForIssuesIds.response",
|
|
285
|
-
),
|
|
286
|
-
)
|
|
287
|
-
.then(commonHttpClient.getBody);
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).
|
|
291
|
-
*
|
|
292
|
-
* If the JQL query expression is too large to be encoded as a query parameter,
|
|
293
|
-
* use the [POST](#api-rest-api-3-search-post) version of this resource.
|
|
294
|
-
*
|
|
295
|
-
* This operation can be accessed anonymously.
|
|
296
|
-
*
|
|
297
|
-
* **[Permissions](#permissions) required:** Issues are included in the response
|
|
298
|
-
* where the user has:
|
|
299
|
-
*
|
|
300
|
-
* * *Browse projects* [project
|
|
301
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
302
|
-
* containing the issue.
|
|
303
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
304
|
-
* configured, issue-level security permission to view the issue.
|
|
305
|
-
*
|
|
306
|
-
* @returns Returned if the request is successful.
|
|
307
|
-
*
|
|
308
|
-
* example: {
|
|
309
|
-
* "expand": "names,schema",
|
|
310
|
-
* "issues": [
|
|
311
|
-
* {
|
|
312
|
-
* "expand": "",
|
|
313
|
-
* "fields": {
|
|
314
|
-
* "watcher": {
|
|
315
|
-
* "isWatching": false,
|
|
316
|
-
* "self":
|
|
317
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/EX-1/watchers",
|
|
318
|
-
* "watchCount": 1,
|
|
319
|
-
* "watchers": [
|
|
320
|
-
* {
|
|
321
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
322
|
-
* "active": false,
|
|
323
|
-
* "displayName": "Mia Krystof",
|
|
324
|
-
* "self":
|
|
325
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
326
|
-
* }
|
|
327
|
-
* ]
|
|
328
|
-
* },
|
|
329
|
-
* "attachment": [
|
|
330
|
-
* {
|
|
331
|
-
* "author": {
|
|
332
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
333
|
-
* "accountType": "atlassian",
|
|
334
|
-
* "active": false,
|
|
335
|
-
* "avatarUrls": {
|
|
336
|
-
* "16x16":
|
|
337
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
338
|
-
* "24x24":
|
|
339
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
340
|
-
* "32x32":
|
|
341
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
342
|
-
* "48x48":
|
|
343
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
344
|
-
* },
|
|
345
|
-
* "displayName": "Mia Krystof",
|
|
346
|
-
* "key": "",
|
|
347
|
-
* "name": "",
|
|
348
|
-
* "self":
|
|
349
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
350
|
-
* },
|
|
351
|
-
* "content":
|
|
352
|
-
* "https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10000",
|
|
353
|
-
* "created": "2022-10-06T07:32:47.000+0000",
|
|
354
|
-
* "filename": "picture.jpg",
|
|
355
|
-
* "id": 10000,
|
|
356
|
-
* "mimeType": "image/jpeg",
|
|
357
|
-
* "self":
|
|
358
|
-
* "https://your-domain.atlassian.net/rest/api/3/attachments/10000",
|
|
359
|
-
* "size": 23123,
|
|
360
|
-
* "thumbnail":
|
|
361
|
-
* "https://your-domain.atlassian.net/jira/rest/api/3/attachment/thumbnail/10000"
|
|
362
|
-
* }
|
|
363
|
-
* ],
|
|
364
|
-
* "sub-tasks": [
|
|
365
|
-
* {
|
|
366
|
-
* "id": "10000",
|
|
367
|
-
* "outwardIssue": {
|
|
368
|
-
* "fields": {
|
|
369
|
-
* "status": {
|
|
370
|
-
* "iconUrl":
|
|
371
|
-
* "https://your-domain.atlassian.net/images/icons/statuses/open.png",
|
|
372
|
-
* "name": "Open"
|
|
373
|
-
* }
|
|
374
|
-
* },
|
|
375
|
-
* "id": "10003",
|
|
376
|
-
* "key": "ED-2",
|
|
377
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/ED-2"
|
|
378
|
-
* },
|
|
379
|
-
* "type": {
|
|
380
|
-
* "id": "10000",
|
|
381
|
-
* "inward": "Parent",
|
|
382
|
-
* "name": "",
|
|
383
|
-
* "outward": "Sub-task"
|
|
384
|
-
* }
|
|
385
|
-
* }
|
|
386
|
-
* ],
|
|
387
|
-
* "description": {
|
|
388
|
-
* "type": "doc",
|
|
389
|
-
* "version": 1,
|
|
390
|
-
* "content": [
|
|
391
|
-
* {
|
|
392
|
-
* "type": "paragraph",
|
|
393
|
-
* "content": [
|
|
394
|
-
* {
|
|
395
|
-
* "type": "text",
|
|
396
|
-
* "text": "Main order flow broken"
|
|
397
|
-
* }
|
|
398
|
-
* ]
|
|
399
|
-
* }
|
|
400
|
-
* ]
|
|
401
|
-
* },
|
|
402
|
-
* "project": {
|
|
403
|
-
* "avatarUrls": {
|
|
404
|
-
* "16x16":
|
|
405
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
406
|
-
* "24x24":
|
|
407
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
408
|
-
* "32x32":
|
|
409
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
410
|
-
* "48x48":
|
|
411
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
412
|
-
* },
|
|
413
|
-
* "id": "10000",
|
|
414
|
-
* "insight": {
|
|
415
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
416
|
-
* "totalIssueCount": 100
|
|
417
|
-
* },
|
|
418
|
-
* "key": "EX",
|
|
419
|
-
* "name": "Example",
|
|
420
|
-
* "projectCategory": {
|
|
421
|
-
* "description": "First Project Category",
|
|
422
|
-
* "id": "10000",
|
|
423
|
-
* "name": "FIRST",
|
|
424
|
-
* "self":
|
|
425
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
426
|
-
* },
|
|
427
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
428
|
-
* "simplified": false,
|
|
429
|
-
* "style": "classic"
|
|
430
|
-
* },
|
|
431
|
-
* "comment": [
|
|
432
|
-
* {
|
|
433
|
-
* "author": {
|
|
434
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
435
|
-
* "active": false,
|
|
436
|
-
* "displayName": "Mia Krystof",
|
|
437
|
-
* "self":
|
|
438
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
439
|
-
* },
|
|
440
|
-
* "body": {
|
|
441
|
-
* "type": "doc",
|
|
442
|
-
* "version": 1,
|
|
443
|
-
* "content": [
|
|
444
|
-
* {
|
|
445
|
-
* "type": "paragraph",
|
|
446
|
-
* "content": [
|
|
447
|
-
* {
|
|
448
|
-
* "type": "text",
|
|
449
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur
|
|
450
|
-
* adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue
|
|
451
|
-
* iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue
|
|
452
|
-
* semper."
|
|
453
|
-
* }
|
|
454
|
-
* ]
|
|
455
|
-
* }
|
|
456
|
-
* ]
|
|
457
|
-
* },
|
|
458
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
459
|
-
* "id": "10000",
|
|
460
|
-
* "self":
|
|
461
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
462
|
-
* "updateAuthor": {
|
|
463
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
464
|
-
* "active": false,
|
|
465
|
-
* "displayName": "Mia Krystof",
|
|
466
|
-
* "self":
|
|
467
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
468
|
-
* },
|
|
469
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
470
|
-
* "visibility": {
|
|
471
|
-
* "identifier": "Administrators",
|
|
472
|
-
* "type": "role",
|
|
473
|
-
* "value": "Administrators"
|
|
474
|
-
* }
|
|
475
|
-
* }
|
|
476
|
-
* ],
|
|
477
|
-
* "issuelinks": [
|
|
478
|
-
* {
|
|
479
|
-
* "id": "10001",
|
|
480
|
-
* "outwardIssue": {
|
|
481
|
-
* "fields": {
|
|
482
|
-
* "status": {
|
|
483
|
-
* "iconUrl":
|
|
484
|
-
* "https://your-domain.atlassian.net/images/icons/statuses/open.png",
|
|
485
|
-
* "name": "Open"
|
|
486
|
-
* }
|
|
487
|
-
* },
|
|
488
|
-
* "id": "10004L",
|
|
489
|
-
* "key": "PR-2",
|
|
490
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/PR-2"
|
|
491
|
-
* },
|
|
492
|
-
* "type": {
|
|
493
|
-
* "id": "10000",
|
|
494
|
-
* "inward": "depends on",
|
|
495
|
-
* "name": "Dependent",
|
|
496
|
-
* "outward": "is depended by"
|
|
497
|
-
* }
|
|
498
|
-
* },
|
|
499
|
-
* {
|
|
500
|
-
* "id": "10002",
|
|
501
|
-
* "inwardIssue": {
|
|
502
|
-
* "fields": {
|
|
503
|
-
* "status": {
|
|
504
|
-
* "iconUrl":
|
|
505
|
-
* "https://your-domain.atlassian.net/images/icons/statuses/open.png",
|
|
506
|
-
* "name": "Open"
|
|
507
|
-
* }
|
|
508
|
-
* },
|
|
509
|
-
* "id": "10004",
|
|
510
|
-
* "key": "PR-3",
|
|
511
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/PR-3"
|
|
512
|
-
* },
|
|
513
|
-
* "type": {
|
|
514
|
-
* "id": "10000",
|
|
515
|
-
* "inward": "depends on",
|
|
516
|
-
* "name": "Dependent",
|
|
517
|
-
* "outward": "is depended by"
|
|
518
|
-
* }
|
|
519
|
-
* }
|
|
520
|
-
* ],
|
|
521
|
-
* "worklog": [
|
|
522
|
-
* {
|
|
523
|
-
* "author": {
|
|
524
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
525
|
-
* "active": false,
|
|
526
|
-
* "displayName": "Mia Krystof",
|
|
527
|
-
* "self":
|
|
528
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
529
|
-
* },
|
|
530
|
-
* "comment": {
|
|
531
|
-
* "type": "doc",
|
|
532
|
-
* "version": 1,
|
|
533
|
-
* "content": [
|
|
534
|
-
* {
|
|
535
|
-
* "type": "paragraph",
|
|
536
|
-
* "content": [
|
|
537
|
-
* {
|
|
538
|
-
* "type": "text",
|
|
539
|
-
* "text": "I did some work here."
|
|
540
|
-
* }
|
|
541
|
-
* ]
|
|
542
|
-
* }
|
|
543
|
-
* ]
|
|
544
|
-
* },
|
|
545
|
-
* "id": "100028",
|
|
546
|
-
* "issueId": "10002",
|
|
547
|
-
* "self":
|
|
548
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
|
|
549
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
550
|
-
* "timeSpent": "3h 20m",
|
|
551
|
-
* "timeSpentSeconds": 12000,
|
|
552
|
-
* "updateAuthor": {
|
|
553
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
554
|
-
* "active": false,
|
|
555
|
-
* "displayName": "Mia Krystof",
|
|
556
|
-
* "self":
|
|
557
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
558
|
-
* },
|
|
559
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
560
|
-
* "visibility": {
|
|
561
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
562
|
-
* "type": "group",
|
|
563
|
-
* "value": "jira-developers"
|
|
564
|
-
* }
|
|
565
|
-
* }
|
|
566
|
-
* ],
|
|
567
|
-
* "updated": 1,
|
|
568
|
-
* "timetracking": {
|
|
569
|
-
* "originalEstimate": "10m",
|
|
570
|
-
* "originalEstimateSeconds": 600,
|
|
571
|
-
* "remainingEstimate": "3m",
|
|
572
|
-
* "remainingEstimateSeconds": 200,
|
|
573
|
-
* "timeSpent": "6m",
|
|
574
|
-
* "timeSpentSeconds": 400
|
|
575
|
-
* }
|
|
576
|
-
* },
|
|
577
|
-
* "id": "10002",
|
|
578
|
-
* "key": "ED-1",
|
|
579
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/10002"
|
|
580
|
-
* }
|
|
581
|
-
* ],
|
|
582
|
-
* "maxResults": 50,
|
|
583
|
-
* "startAt": 0,
|
|
584
|
-
* "total": 1,
|
|
585
|
-
* "warningMessages": [
|
|
586
|
-
* "The value 'bar' does not exist for the field 'foo'."
|
|
587
|
-
* ]
|
|
588
|
-
* }
|
|
589
|
-
* @path {GET} /rest/api/3/search
|
|
590
|
-
* @scopes-current read:jira-work
|
|
591
|
-
* @scopes-beta read:issue-details:jira, read:audit-log:jira, read:avatar:jira,
|
|
592
|
-
* read:field-configuration:jira, read:issue-meta:jira
|
|
593
|
-
*/
|
|
594
|
-
searchForIssuesUsingJql({
|
|
595
|
-
jql,
|
|
596
|
-
startAt,
|
|
597
|
-
maxResults,
|
|
598
|
-
validateQuery,
|
|
599
|
-
fields,
|
|
600
|
-
expand,
|
|
601
|
-
properties,
|
|
602
|
-
fieldsByKeys,
|
|
603
|
-
}: {
|
|
604
|
-
/**
|
|
605
|
-
* The [JQL](https://confluence.atlassian.com/x/egORLQ) that defines the search.
|
|
606
|
-
* Note:
|
|
607
|
-
*
|
|
608
|
-
* * If no JQL expression is provided, all issues are returned.
|
|
609
|
-
* * `username` and `userkey` cannot be used as search terms due to privacy
|
|
610
|
-
* reasons. Use `accountId` instead.
|
|
611
|
-
* * If a user has hidden their email address in their user profile, partial
|
|
612
|
-
* matches of the email address will not find the user. An exact match is required.
|
|
613
|
-
*/
|
|
614
|
-
jql?: string;
|
|
615
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
616
|
-
startAt?: number;
|
|
617
|
-
/**
|
|
618
|
-
* The maximum number of items to return per page. To manage page size, Jira may
|
|
619
|
-
* return fewer items per page where a large number of fields are requested. The
|
|
620
|
-
* greatest number of items returned per page is achieved when requesting `id` or
|
|
621
|
-
* `key` only.
|
|
622
|
-
*/
|
|
623
|
-
maxResults?: number;
|
|
624
|
-
/**
|
|
625
|
-
* Determines how to validate the JQL query and treat the validation results.
|
|
626
|
-
* Supported values are:
|
|
627
|
-
*
|
|
628
|
-
* * `strict` Returns a 400 response code if any errors are found, along with a
|
|
629
|
-
* list of all errors (and warnings).
|
|
630
|
-
* * `warn` Returns all errors as warnings.
|
|
631
|
-
* * `none` No validation is performed.
|
|
632
|
-
* * `true` *Deprecated* A legacy synonym for `strict`.
|
|
633
|
-
* * `false` *Deprecated* A legacy synonym for `warn`.
|
|
634
|
-
*
|
|
635
|
-
* Note: If the JQL is not correctly formed a 400 response code is returned,
|
|
636
|
-
* regardless of the `validateQuery` value.
|
|
637
|
-
*/
|
|
638
|
-
validateQuery?: "strict" | "warn" | "none" | "true" | "false";
|
|
639
|
-
/**
|
|
640
|
-
* A list of fields to return for each issue, use it to retrieve a subset of
|
|
641
|
-
* fields. This parameter accepts a comma-separated list. Expand options include:
|
|
642
|
-
*
|
|
643
|
-
* * `*all` Returns all fields.
|
|
644
|
-
* * `*navigable` Returns navigable fields.
|
|
645
|
-
* * Any issue field, prefixed with a minus to exclude.
|
|
646
|
-
*
|
|
647
|
-
* Examples:
|
|
648
|
-
*
|
|
649
|
-
* * `summary,comment` Returns only the summary and comments fields.
|
|
650
|
-
* * `-description` Returns all navigable (default) fields except description.
|
|
651
|
-
* * `*all,-comment` Returns all fields except comments.
|
|
652
|
-
*
|
|
653
|
-
* This parameter may be specified multiple times. For example,
|
|
654
|
-
* `fields=field1,field2&fields=field3`.
|
|
655
|
-
*
|
|
656
|
-
* Note: All navigable fields are returned by default. This differs from [GET
|
|
657
|
-
* issue](#api-rest-api-3-issue-issueIdOrKey-get) where the default is all fields.
|
|
658
|
-
*/
|
|
659
|
-
fields?: string[];
|
|
660
|
-
/**
|
|
661
|
-
* Use [expand](#expansion) to include additional information about issues in the
|
|
662
|
-
* response. This parameter accepts a comma-separated list. Expand options include:
|
|
663
|
-
*
|
|
664
|
-
* * `renderedFields` Returns field values rendered in HTML format.
|
|
665
|
-
* * `names` Returns the display name of each field.
|
|
666
|
-
* * `schema` Returns the schema describing a field type.
|
|
667
|
-
* * `transitions` Returns all possible transitions for the issue.
|
|
668
|
-
* * `operations` Returns all possible operations for the issue.
|
|
669
|
-
* * `editmeta` Returns information about how each field can be edited.
|
|
670
|
-
* * `changelog` Returns a list of recent updates to an issue, sorted by date,
|
|
671
|
-
* starting from the most recent.
|
|
672
|
-
* * `versionedRepresentations` Instead of `fields`, returns
|
|
673
|
-
* `versionedRepresentations` a JSON array containing each version of a field's
|
|
674
|
-
* value, with the highest numbered item representing the most recent version.
|
|
675
|
-
*/
|
|
676
|
-
expand?: string;
|
|
677
|
-
/**
|
|
678
|
-
* A list of issue property keys for issue properties to include in the results.
|
|
679
|
-
* This parameter accepts a comma-separated list. Multiple properties can also be
|
|
680
|
-
* provided using an ampersand separated list. For example,
|
|
681
|
-
* `properties=prop1,prop2&properties=prop3`. A maximum of 5 issue property keys
|
|
682
|
-
* can be specified.
|
|
683
|
-
*/
|
|
684
|
-
properties?: string[];
|
|
685
|
-
/** Reference fields by their key (rather than ID). */
|
|
686
|
-
fieldsByKeys?: boolean;
|
|
687
|
-
}): Promise<SearchResults> {
|
|
688
|
-
return this.getClientInstance()
|
|
689
|
-
.request({
|
|
690
|
-
path: "/rest/api/3/search",
|
|
691
|
-
method: "GET",
|
|
692
|
-
query: {
|
|
693
|
-
jql,
|
|
694
|
-
startAt,
|
|
695
|
-
maxResults,
|
|
696
|
-
validateQuery,
|
|
697
|
-
fields,
|
|
698
|
-
expand,
|
|
699
|
-
properties,
|
|
700
|
-
fieldsByKeys,
|
|
701
|
-
},
|
|
702
|
-
})
|
|
703
|
-
.then(
|
|
704
|
-
this.getClientInstance().responseHandler({
|
|
705
|
-
200: {
|
|
706
|
-
"application/json": "json",
|
|
707
|
-
},
|
|
708
|
-
}),
|
|
709
|
-
)
|
|
710
|
-
.then(
|
|
711
|
-
commonHttpClient.castResponse<{
|
|
712
|
-
status: 200;
|
|
713
|
-
mediaType: "application/json";
|
|
714
|
-
body: SearchResults;
|
|
715
|
-
}>(),
|
|
716
|
-
)
|
|
717
|
-
.then(
|
|
718
|
-
validationSchemaStorage.validator(
|
|
719
|
-
"IssueSearchService.searchForIssuesUsingJql.response",
|
|
720
|
-
),
|
|
721
|
-
)
|
|
722
|
-
.then(commonHttpClient.getBody);
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).
|
|
726
|
-
*
|
|
727
|
-
* There is a [GET](#api-rest-api-3-search-get) version of this resource that can
|
|
728
|
-
* be used for smaller JQL query expressions.
|
|
729
|
-
*
|
|
730
|
-
* This operation can be accessed anonymously.
|
|
731
|
-
*
|
|
732
|
-
* **[Permissions](#permissions) required:** Issues are included in the response
|
|
733
|
-
* where the user has:
|
|
734
|
-
*
|
|
735
|
-
* * *Browse projects* [project
|
|
736
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
737
|
-
* containing the issue.
|
|
738
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
739
|
-
* configured, issue-level security permission to view the issue.
|
|
740
|
-
*
|
|
741
|
-
* @returns Returned if the request is successful.
|
|
742
|
-
*
|
|
743
|
-
* example: {
|
|
744
|
-
* "expand": "names,schema",
|
|
745
|
-
* "issues": [
|
|
746
|
-
* {
|
|
747
|
-
* "expand": "",
|
|
748
|
-
* "fields": {
|
|
749
|
-
* "watcher": {
|
|
750
|
-
* "isWatching": false,
|
|
751
|
-
* "self":
|
|
752
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/EX-1/watchers",
|
|
753
|
-
* "watchCount": 1,
|
|
754
|
-
* "watchers": [
|
|
755
|
-
* {
|
|
756
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
757
|
-
* "active": false,
|
|
758
|
-
* "displayName": "Mia Krystof",
|
|
759
|
-
* "self":
|
|
760
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
761
|
-
* }
|
|
762
|
-
* ]
|
|
763
|
-
* },
|
|
764
|
-
* "attachment": [
|
|
765
|
-
* {
|
|
766
|
-
* "author": {
|
|
767
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
768
|
-
* "accountType": "atlassian",
|
|
769
|
-
* "active": false,
|
|
770
|
-
* "avatarUrls": {
|
|
771
|
-
* "16x16":
|
|
772
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
773
|
-
* "24x24":
|
|
774
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
775
|
-
* "32x32":
|
|
776
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
777
|
-
* "48x48":
|
|
778
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
779
|
-
* },
|
|
780
|
-
* "displayName": "Mia Krystof",
|
|
781
|
-
* "key": "",
|
|
782
|
-
* "name": "",
|
|
783
|
-
* "self":
|
|
784
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
785
|
-
* },
|
|
786
|
-
* "content":
|
|
787
|
-
* "https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10000",
|
|
788
|
-
* "created": "2022-10-06T07:32:47.000+0000",
|
|
789
|
-
* "filename": "picture.jpg",
|
|
790
|
-
* "id": 10000,
|
|
791
|
-
* "mimeType": "image/jpeg",
|
|
792
|
-
* "self":
|
|
793
|
-
* "https://your-domain.atlassian.net/rest/api/3/attachments/10000",
|
|
794
|
-
* "size": 23123,
|
|
795
|
-
* "thumbnail":
|
|
796
|
-
* "https://your-domain.atlassian.net/jira/rest/api/3/attachment/thumbnail/10000"
|
|
797
|
-
* }
|
|
798
|
-
* ],
|
|
799
|
-
* "sub-tasks": [
|
|
800
|
-
* {
|
|
801
|
-
* "id": "10000",
|
|
802
|
-
* "outwardIssue": {
|
|
803
|
-
* "fields": {
|
|
804
|
-
* "status": {
|
|
805
|
-
* "iconUrl":
|
|
806
|
-
* "https://your-domain.atlassian.net/images/icons/statuses/open.png",
|
|
807
|
-
* "name": "Open"
|
|
808
|
-
* }
|
|
809
|
-
* },
|
|
810
|
-
* "id": "10003",
|
|
811
|
-
* "key": "ED-2",
|
|
812
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/ED-2"
|
|
813
|
-
* },
|
|
814
|
-
* "type": {
|
|
815
|
-
* "id": "10000",
|
|
816
|
-
* "inward": "Parent",
|
|
817
|
-
* "name": "",
|
|
818
|
-
* "outward": "Sub-task"
|
|
819
|
-
* }
|
|
820
|
-
* }
|
|
821
|
-
* ],
|
|
822
|
-
* "description": {
|
|
823
|
-
* "type": "doc",
|
|
824
|
-
* "version": 1,
|
|
825
|
-
* "content": [
|
|
826
|
-
* {
|
|
827
|
-
* "type": "paragraph",
|
|
828
|
-
* "content": [
|
|
829
|
-
* {
|
|
830
|
-
* "type": "text",
|
|
831
|
-
* "text": "Main order flow broken"
|
|
832
|
-
* }
|
|
833
|
-
* ]
|
|
834
|
-
* }
|
|
835
|
-
* ]
|
|
836
|
-
* },
|
|
837
|
-
* "project": {
|
|
838
|
-
* "avatarUrls": {
|
|
839
|
-
* "16x16":
|
|
840
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
841
|
-
* "24x24":
|
|
842
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
843
|
-
* "32x32":
|
|
844
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
845
|
-
* "48x48":
|
|
846
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
847
|
-
* },
|
|
848
|
-
* "id": "10000",
|
|
849
|
-
* "insight": {
|
|
850
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
851
|
-
* "totalIssueCount": 100
|
|
852
|
-
* },
|
|
853
|
-
* "key": "EX",
|
|
854
|
-
* "name": "Example",
|
|
855
|
-
* "projectCategory": {
|
|
856
|
-
* "description": "First Project Category",
|
|
857
|
-
* "id": "10000",
|
|
858
|
-
* "name": "FIRST",
|
|
859
|
-
* "self":
|
|
860
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
861
|
-
* },
|
|
862
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
863
|
-
* "simplified": false,
|
|
864
|
-
* "style": "classic"
|
|
865
|
-
* },
|
|
866
|
-
* "comment": [
|
|
867
|
-
* {
|
|
868
|
-
* "author": {
|
|
869
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
870
|
-
* "active": false,
|
|
871
|
-
* "displayName": "Mia Krystof",
|
|
872
|
-
* "self":
|
|
873
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
874
|
-
* },
|
|
875
|
-
* "body": {
|
|
876
|
-
* "type": "doc",
|
|
877
|
-
* "version": 1,
|
|
878
|
-
* "content": [
|
|
879
|
-
* {
|
|
880
|
-
* "type": "paragraph",
|
|
881
|
-
* "content": [
|
|
882
|
-
* {
|
|
883
|
-
* "type": "text",
|
|
884
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur
|
|
885
|
-
* adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue
|
|
886
|
-
* iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue
|
|
887
|
-
* semper."
|
|
888
|
-
* }
|
|
889
|
-
* ]
|
|
890
|
-
* }
|
|
891
|
-
* ]
|
|
892
|
-
* },
|
|
893
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
894
|
-
* "id": "10000",
|
|
895
|
-
* "self":
|
|
896
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
897
|
-
* "updateAuthor": {
|
|
898
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
899
|
-
* "active": false,
|
|
900
|
-
* "displayName": "Mia Krystof",
|
|
901
|
-
* "self":
|
|
902
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
903
|
-
* },
|
|
904
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
905
|
-
* "visibility": {
|
|
906
|
-
* "identifier": "Administrators",
|
|
907
|
-
* "type": "role",
|
|
908
|
-
* "value": "Administrators"
|
|
909
|
-
* }
|
|
910
|
-
* }
|
|
911
|
-
* ],
|
|
912
|
-
* "issuelinks": [
|
|
913
|
-
* {
|
|
914
|
-
* "id": "10001",
|
|
915
|
-
* "outwardIssue": {
|
|
916
|
-
* "fields": {
|
|
917
|
-
* "status": {
|
|
918
|
-
* "iconUrl":
|
|
919
|
-
* "https://your-domain.atlassian.net/images/icons/statuses/open.png",
|
|
920
|
-
* "name": "Open"
|
|
921
|
-
* }
|
|
922
|
-
* },
|
|
923
|
-
* "id": "10004L",
|
|
924
|
-
* "key": "PR-2",
|
|
925
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/PR-2"
|
|
926
|
-
* },
|
|
927
|
-
* "type": {
|
|
928
|
-
* "id": "10000",
|
|
929
|
-
* "inward": "depends on",
|
|
930
|
-
* "name": "Dependent",
|
|
931
|
-
* "outward": "is depended by"
|
|
932
|
-
* }
|
|
933
|
-
* },
|
|
934
|
-
* {
|
|
935
|
-
* "id": "10002",
|
|
936
|
-
* "inwardIssue": {
|
|
937
|
-
* "fields": {
|
|
938
|
-
* "status": {
|
|
939
|
-
* "iconUrl":
|
|
940
|
-
* "https://your-domain.atlassian.net/images/icons/statuses/open.png",
|
|
941
|
-
* "name": "Open"
|
|
942
|
-
* }
|
|
943
|
-
* },
|
|
944
|
-
* "id": "10004",
|
|
945
|
-
* "key": "PR-3",
|
|
946
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/PR-3"
|
|
947
|
-
* },
|
|
948
|
-
* "type": {
|
|
949
|
-
* "id": "10000",
|
|
950
|
-
* "inward": "depends on",
|
|
951
|
-
* "name": "Dependent",
|
|
952
|
-
* "outward": "is depended by"
|
|
953
|
-
* }
|
|
954
|
-
* }
|
|
955
|
-
* ],
|
|
956
|
-
* "worklog": [
|
|
957
|
-
* {
|
|
958
|
-
* "author": {
|
|
959
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
960
|
-
* "active": false,
|
|
961
|
-
* "displayName": "Mia Krystof",
|
|
962
|
-
* "self":
|
|
963
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
964
|
-
* },
|
|
965
|
-
* "comment": {
|
|
966
|
-
* "type": "doc",
|
|
967
|
-
* "version": 1,
|
|
968
|
-
* "content": [
|
|
969
|
-
* {
|
|
970
|
-
* "type": "paragraph",
|
|
971
|
-
* "content": [
|
|
972
|
-
* {
|
|
973
|
-
* "type": "text",
|
|
974
|
-
* "text": "I did some work here."
|
|
975
|
-
* }
|
|
976
|
-
* ]
|
|
977
|
-
* }
|
|
978
|
-
* ]
|
|
979
|
-
* },
|
|
980
|
-
* "id": "100028",
|
|
981
|
-
* "issueId": "10002",
|
|
982
|
-
* "self":
|
|
983
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
|
|
984
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
985
|
-
* "timeSpent": "3h 20m",
|
|
986
|
-
* "timeSpentSeconds": 12000,
|
|
987
|
-
* "updateAuthor": {
|
|
988
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
989
|
-
* "active": false,
|
|
990
|
-
* "displayName": "Mia Krystof",
|
|
991
|
-
* "self":
|
|
992
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
993
|
-
* },
|
|
994
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
995
|
-
* "visibility": {
|
|
996
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
997
|
-
* "type": "group",
|
|
998
|
-
* "value": "jira-developers"
|
|
999
|
-
* }
|
|
1000
|
-
* }
|
|
1001
|
-
* ],
|
|
1002
|
-
* "updated": 1,
|
|
1003
|
-
* "timetracking": {
|
|
1004
|
-
* "originalEstimate": "10m",
|
|
1005
|
-
* "originalEstimateSeconds": 600,
|
|
1006
|
-
* "remainingEstimate": "3m",
|
|
1007
|
-
* "remainingEstimateSeconds": 200,
|
|
1008
|
-
* "timeSpent": "6m",
|
|
1009
|
-
* "timeSpentSeconds": 400
|
|
1010
|
-
* }
|
|
1011
|
-
* },
|
|
1012
|
-
* "id": "10002",
|
|
1013
|
-
* "key": "ED-1",
|
|
1014
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/10002"
|
|
1015
|
-
* }
|
|
1016
|
-
* ],
|
|
1017
|
-
* "maxResults": 50,
|
|
1018
|
-
* "startAt": 0,
|
|
1019
|
-
* "total": 1,
|
|
1020
|
-
* "warningMessages": [
|
|
1021
|
-
* "The value 'bar' does not exist for the field 'foo'."
|
|
1022
|
-
* ]
|
|
1023
|
-
* }
|
|
1024
|
-
* @path {POST} /rest/api/3/search
|
|
1025
|
-
* @scopes-current read:jira-work
|
|
1026
|
-
* @scopes-beta read:issue-details:jira, read:field.default-value:jira, read:field.option:jira,
|
|
1027
|
-
* read:field:jira, read:group:jira
|
|
1028
|
-
*/
|
|
1029
|
-
searchForIssuesUsingJqlPost({
|
|
1030
|
-
searchRequestBean,
|
|
1031
|
-
}: {
|
|
1032
|
-
/**
|
|
1033
|
-
* A JSON object containing the search request.
|
|
1034
|
-
*
|
|
1035
|
-
* @example {
|
|
1036
|
-
* "expand": [
|
|
1037
|
-
* "names",
|
|
1038
|
-
* "schema",
|
|
1039
|
-
* "operations"
|
|
1040
|
-
* ],
|
|
1041
|
-
* "fields": [
|
|
1042
|
-
* "summary",
|
|
1043
|
-
* "status",
|
|
1044
|
-
* "assignee"
|
|
1045
|
-
* ],
|
|
1046
|
-
* "fieldsByKeys": false,
|
|
1047
|
-
* "jql": "project = HSP",
|
|
1048
|
-
* "maxResults": 15,
|
|
1049
|
-
* "startAt": 0
|
|
1050
|
-
* }
|
|
1051
|
-
*/
|
|
1052
|
-
searchRequestBean: SearchRequestBean;
|
|
1053
|
-
}): Promise<SearchResults> {
|
|
1054
|
-
return this.getClientInstance()
|
|
1055
|
-
.request({
|
|
1056
|
-
path: "/rest/api/3/search",
|
|
1057
|
-
method: "POST",
|
|
1058
|
-
headers: {
|
|
1059
|
-
"Content-Type": "application/json",
|
|
1060
|
-
},
|
|
1061
|
-
body: searchRequestBean,
|
|
1062
|
-
})
|
|
1063
|
-
.then(
|
|
1064
|
-
this.getClientInstance().responseHandler({
|
|
1065
|
-
200: {
|
|
1066
|
-
"application/json": "json",
|
|
1067
|
-
},
|
|
1068
|
-
}),
|
|
1069
|
-
)
|
|
1070
|
-
.then(
|
|
1071
|
-
commonHttpClient.castResponse<{
|
|
1072
|
-
status: 200;
|
|
1073
|
-
mediaType: "application/json";
|
|
1074
|
-
body: SearchResults;
|
|
1075
|
-
}>(),
|
|
1076
|
-
)
|
|
1077
|
-
.then(
|
|
1078
|
-
validationSchemaStorage.validator(
|
|
1079
|
-
"IssueSearchService.searchForIssuesUsingJqlPost.response",
|
|
1080
|
-
),
|
|
1081
|
-
)
|
|
1082
|
-
.then(commonHttpClient.getBody);
|
|
1083
|
-
}
|
|
1084
|
-
static initialize() {
|
|
1085
|
-
validationSchemaStorage.registerExtensible(
|
|
1086
|
-
"IssueSearchService.getIssuePickerResource.response",
|
|
1087
|
-
z
|
|
1088
|
-
.object({
|
|
1089
|
-
status: z.literal(200),
|
|
1090
|
-
mediaType: z.literal("application/json"),
|
|
1091
|
-
body: validationSchemaStorage.lazy("IssuePickerSuggestions"),
|
|
1092
|
-
})
|
|
1093
|
-
.describe("IssueSearchService.getIssuePickerResource.response"),
|
|
1094
|
-
);
|
|
1095
|
-
validationSchemaStorage.registerExtensible(
|
|
1096
|
-
"IssueSearchService.matchIssues.response",
|
|
1097
|
-
z
|
|
1098
|
-
.object({
|
|
1099
|
-
status: z.literal(200),
|
|
1100
|
-
mediaType: z.literal("application/json"),
|
|
1101
|
-
body: validationSchemaStorage.lazy("IssueMatches"),
|
|
1102
|
-
})
|
|
1103
|
-
.describe("IssueSearchService.matchIssues.response"),
|
|
1104
|
-
);
|
|
1105
|
-
validationSchemaStorage.registerExtensible(
|
|
1106
|
-
"IssueSearchService.searchForIssuesUsingJql.response",
|
|
1107
|
-
z
|
|
1108
|
-
.object({
|
|
1109
|
-
status: z.literal(200),
|
|
1110
|
-
mediaType: z.literal("application/json"),
|
|
1111
|
-
body: validationSchemaStorage.lazy("SearchResults"),
|
|
1112
|
-
})
|
|
1113
|
-
.describe("IssueSearchService.searchForIssuesUsingJql.response"),
|
|
1114
|
-
);
|
|
1115
|
-
validationSchemaStorage.registerExtensible(
|
|
1116
|
-
"IssueSearchService.searchForIssuesUsingJqlPost.response",
|
|
1117
|
-
z
|
|
1118
|
-
.object({
|
|
1119
|
-
status: z.literal(200),
|
|
1120
|
-
mediaType: z.literal("application/json"),
|
|
1121
|
-
body: validationSchemaStorage.lazy("SearchResults"),
|
|
1122
|
-
})
|
|
1123
|
-
.describe("IssueSearchService.searchForIssuesUsingJqlPost.response"),
|
|
1124
|
-
);
|
|
1125
|
-
validationSchemaStorage.registerExtensible(
|
|
1126
|
-
"IssueSearchService.searchForIssuesIds.response",
|
|
1127
|
-
z
|
|
1128
|
-
.object({
|
|
1129
|
-
status: z.literal(200),
|
|
1130
|
-
mediaType: z.literal("application/json"),
|
|
1131
|
-
body: validationSchemaStorage.lazy("IdSearchResults"),
|
|
1132
|
-
})
|
|
1133
|
-
.describe("IssueSearchService.searchForIssuesIds.response"),
|
|
1134
|
-
);
|
|
1135
|
-
validationSchemaStorage.registerOnce([
|
|
1136
|
-
registerIssueSearchValidationSchemas,
|
|
1137
|
-
]);
|
|
1138
|
-
}
|
|
1139
|
-
}
|