@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,1001 +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 PageBeanProject,
|
|
10
|
-
registerCommonValidationSchemas,
|
|
11
|
-
} from "../models/common";
|
|
12
|
-
import {
|
|
13
|
-
type CreatePrioritySchemeDetails,
|
|
14
|
-
type PageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects,
|
|
15
|
-
type PageBeanPriorityWithSequence,
|
|
16
|
-
type PrioritySchemeId,
|
|
17
|
-
registerPrioritySchemesValidationSchemas,
|
|
18
|
-
type SuggestedMappingsRequestBean,
|
|
19
|
-
type UpdatePrioritySchemeRequestBean,
|
|
20
|
-
type UpdatePrioritySchemeResponseBean,
|
|
21
|
-
} from "../models/priority-schemes";
|
|
22
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
23
|
-
/**
|
|
24
|
-
* This resource represents issue priority schemes. Use it to get priority schemes
|
|
25
|
-
* and related information, and to create, update and delete priority schemes.
|
|
26
|
-
*/
|
|
27
|
-
export class PrioritySchemesService extends CommonHttpService {
|
|
28
|
-
/**
|
|
29
|
-
* Creates a new priority scheme.
|
|
30
|
-
*
|
|
31
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
32
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
33
|
-
*
|
|
34
|
-
* @returns * status: 201, mediaType: application/json
|
|
35
|
-
*
|
|
36
|
-
* Returned if the request is completed.
|
|
37
|
-
*
|
|
38
|
-
* example: {
|
|
39
|
-
* "id": "10001"
|
|
40
|
-
* }
|
|
41
|
-
*
|
|
42
|
-
* * status: 202, mediaType: application/json
|
|
43
|
-
*
|
|
44
|
-
* Returned if the request is accepted.
|
|
45
|
-
*
|
|
46
|
-
* example: {
|
|
47
|
-
* "id": "10001",
|
|
48
|
-
* "task": {
|
|
49
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/task/1",
|
|
50
|
-
* "id": "1",
|
|
51
|
-
* "description": "Task description",
|
|
52
|
-
* "status": "COMPLETE",
|
|
53
|
-
* "result": "the task result, this may be any JSON",
|
|
54
|
-
* "submittedBy": 10000,
|
|
55
|
-
* "progress": 100,
|
|
56
|
-
* "elapsedRuntime": 156,
|
|
57
|
-
* "submitted": 1501708132800,
|
|
58
|
-
* "started": 1501708132900,
|
|
59
|
-
* "finished": 1501708133000,
|
|
60
|
-
* "lastUpdate": 1501708133000
|
|
61
|
-
* }
|
|
62
|
-
* }
|
|
63
|
-
* @path {POST} /rest/api/3/priorityscheme
|
|
64
|
-
*/
|
|
65
|
-
createPriorityScheme({
|
|
66
|
-
createPrioritySchemeDetails,
|
|
67
|
-
}: {
|
|
68
|
-
/**
|
|
69
|
-
* @example {
|
|
70
|
-
* "defaultPriorityId": 10001,
|
|
71
|
-
* "description": "My priority scheme description",
|
|
72
|
-
* "mappings": {
|
|
73
|
-
* "in": {
|
|
74
|
-
* "10002": 10000,
|
|
75
|
-
* "10005": 10001,
|
|
76
|
-
* "10006": 10001,
|
|
77
|
-
* "10008": 10003
|
|
78
|
-
* },
|
|
79
|
-
* "out": {}
|
|
80
|
-
* },
|
|
81
|
-
* "name": "My new priority scheme",
|
|
82
|
-
* "priorityIds": [
|
|
83
|
-
* 10000,
|
|
84
|
-
* 10001,
|
|
85
|
-
* 10003
|
|
86
|
-
* ],
|
|
87
|
-
* "projectIds": [
|
|
88
|
-
* 10005,
|
|
89
|
-
* 10006,
|
|
90
|
-
* 10007
|
|
91
|
-
* ]
|
|
92
|
-
* }
|
|
93
|
-
*/
|
|
94
|
-
createPrioritySchemeDetails: CreatePrioritySchemeDetails;
|
|
95
|
-
}): Promise<
|
|
96
|
-
commonHttpClient.WithResponse<{
|
|
97
|
-
status: 201 | 202;
|
|
98
|
-
mediaType: "application/json";
|
|
99
|
-
body: PrioritySchemeId;
|
|
100
|
-
}>
|
|
101
|
-
> {
|
|
102
|
-
return this.getClientInstance()
|
|
103
|
-
.request({
|
|
104
|
-
path: "/rest/api/3/priorityscheme",
|
|
105
|
-
method: "POST",
|
|
106
|
-
headers: {
|
|
107
|
-
"Content-Type": "application/json",
|
|
108
|
-
},
|
|
109
|
-
body: createPrioritySchemeDetails,
|
|
110
|
-
})
|
|
111
|
-
.then(
|
|
112
|
-
this.getClientInstance().responseHandler({
|
|
113
|
-
201: {
|
|
114
|
-
"application/json": "json",
|
|
115
|
-
},
|
|
116
|
-
202: {
|
|
117
|
-
"application/json": "json",
|
|
118
|
-
},
|
|
119
|
-
}),
|
|
120
|
-
)
|
|
121
|
-
.then(
|
|
122
|
-
commonHttpClient.castResponse<{
|
|
123
|
-
status: 201 | 202;
|
|
124
|
-
mediaType: "application/json";
|
|
125
|
-
body: PrioritySchemeId;
|
|
126
|
-
}>(),
|
|
127
|
-
)
|
|
128
|
-
.then(
|
|
129
|
-
validationSchemaStorage.validator(
|
|
130
|
-
"PrioritySchemesService.createPriorityScheme.response",
|
|
131
|
-
),
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Deletes a priority scheme.
|
|
136
|
-
*
|
|
137
|
-
* This operation is only available for priority schemes without any associated
|
|
138
|
-
* projects. Any associated projects must be removed from the priority scheme
|
|
139
|
-
* before this operation can be performed.
|
|
140
|
-
*
|
|
141
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
142
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
143
|
-
*
|
|
144
|
-
* @returns Returned if the request is successful.
|
|
145
|
-
* @path {DELETE} /rest/api/3/priorityscheme/{schemeId}
|
|
146
|
-
*/
|
|
147
|
-
deletePriorityScheme({
|
|
148
|
-
schemeId,
|
|
149
|
-
}: {
|
|
150
|
-
/** The priority scheme ID. */
|
|
151
|
-
schemeId: number;
|
|
152
|
-
}): Promise<void> {
|
|
153
|
-
return this.getClientInstance()
|
|
154
|
-
.request({
|
|
155
|
-
path: "/rest/api/3/priorityscheme/{schemeId}",
|
|
156
|
-
method: "DELETE",
|
|
157
|
-
pathParams: {
|
|
158
|
-
schemeId,
|
|
159
|
-
},
|
|
160
|
-
})
|
|
161
|
-
.then(
|
|
162
|
-
this.getClientInstance().responseHandler({
|
|
163
|
-
204: {
|
|
164
|
-
"application/json": "json",
|
|
165
|
-
},
|
|
166
|
-
}),
|
|
167
|
-
)
|
|
168
|
-
.then(
|
|
169
|
-
commonHttpClient.castResponse<{
|
|
170
|
-
status: 204;
|
|
171
|
-
mediaType: "application/json";
|
|
172
|
-
body: void;
|
|
173
|
-
}>(),
|
|
174
|
-
)
|
|
175
|
-
.then(
|
|
176
|
-
validationSchemaStorage.validator(
|
|
177
|
-
"PrioritySchemesService.deletePriorityScheme.response",
|
|
178
|
-
),
|
|
179
|
-
)
|
|
180
|
-
.then(commonHttpClient.getBody);
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Returns a [paginated](#pagination) list of priorities available for adding to a
|
|
184
|
-
* priority scheme.
|
|
185
|
-
*
|
|
186
|
-
* **[Permissions](#permissions) required:** Permission to access Jira.
|
|
187
|
-
*
|
|
188
|
-
* @returns Returned if the request is successful.
|
|
189
|
-
*
|
|
190
|
-
* example: {
|
|
191
|
-
* "isLast": true,
|
|
192
|
-
* "maxResults": 50,
|
|
193
|
-
* "startAt": 0,
|
|
194
|
-
* "total": 3,
|
|
195
|
-
* "values": [
|
|
196
|
-
* {
|
|
197
|
-
* "description": "Serious problem that could block progress.",
|
|
198
|
-
* "iconUrl": "/images/icons/priorities/high.svg",
|
|
199
|
-
* "id": "1",
|
|
200
|
-
* "isDefault": false,
|
|
201
|
-
* "name": "High",
|
|
202
|
-
* "statusColor": "#f15C75"
|
|
203
|
-
* },
|
|
204
|
-
* {
|
|
205
|
-
* "description": "Has the potential to affect progress.",
|
|
206
|
-
* "iconUrl": "/images/icons/priorities/medium.svg",
|
|
207
|
-
* "id": "2",
|
|
208
|
-
* "isDefault": true,
|
|
209
|
-
* "name": "Medium",
|
|
210
|
-
* "statusColor": "#f79232"
|
|
211
|
-
* },
|
|
212
|
-
* {
|
|
213
|
-
* "description": "Minor problem or easily worked around.",
|
|
214
|
-
* "iconUrl": "/images/icons/priorities/low.svg",
|
|
215
|
-
* "id": "3",
|
|
216
|
-
* "isDefault": false,
|
|
217
|
-
* "name": "Low",
|
|
218
|
-
* "statusColor": "#707070"
|
|
219
|
-
* }
|
|
220
|
-
* ]
|
|
221
|
-
* }
|
|
222
|
-
* @path {GET} /rest/api/3/priorityscheme/priorities/available
|
|
223
|
-
*/
|
|
224
|
-
getAvailablePrioritiesByPriorityScheme({
|
|
225
|
-
startAt,
|
|
226
|
-
maxResults,
|
|
227
|
-
query,
|
|
228
|
-
schemeId,
|
|
229
|
-
exclude,
|
|
230
|
-
}: {
|
|
231
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
232
|
-
startAt?: string;
|
|
233
|
-
/** The maximum number of items to return per page. */
|
|
234
|
-
maxResults?: string;
|
|
235
|
-
/** The string to query priorities on by name. */
|
|
236
|
-
query?: string;
|
|
237
|
-
/** The priority scheme ID. */
|
|
238
|
-
schemeId: string;
|
|
239
|
-
/** A list of priority IDs to exclude from the results. */
|
|
240
|
-
exclude?: string[];
|
|
241
|
-
}): Promise<PageBeanPriorityWithSequence> {
|
|
242
|
-
return this.getClientInstance()
|
|
243
|
-
.request({
|
|
244
|
-
path: "/rest/api/3/priorityscheme/priorities/available",
|
|
245
|
-
method: "GET",
|
|
246
|
-
query: {
|
|
247
|
-
startAt,
|
|
248
|
-
maxResults,
|
|
249
|
-
query,
|
|
250
|
-
schemeId,
|
|
251
|
-
exclude,
|
|
252
|
-
},
|
|
253
|
-
})
|
|
254
|
-
.then(
|
|
255
|
-
this.getClientInstance().responseHandler({
|
|
256
|
-
200: {
|
|
257
|
-
"application/json": "json",
|
|
258
|
-
},
|
|
259
|
-
}),
|
|
260
|
-
)
|
|
261
|
-
.then(
|
|
262
|
-
commonHttpClient.castResponse<{
|
|
263
|
-
status: 200;
|
|
264
|
-
mediaType: "application/json";
|
|
265
|
-
body: PageBeanPriorityWithSequence;
|
|
266
|
-
}>(),
|
|
267
|
-
)
|
|
268
|
-
.then(
|
|
269
|
-
validationSchemaStorage.validator(
|
|
270
|
-
"PrioritySchemesService.getAvailablePrioritiesByPriorityScheme.response",
|
|
271
|
-
),
|
|
272
|
-
)
|
|
273
|
-
.then(commonHttpClient.getBody);
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Returns a [paginated](#pagination) list of priorities by scheme.
|
|
277
|
-
*
|
|
278
|
-
* **[Permissions](#permissions) required:** Permission to access Jira.
|
|
279
|
-
*
|
|
280
|
-
* @returns Returned if the request is successful.
|
|
281
|
-
*
|
|
282
|
-
* example: {
|
|
283
|
-
* "isLast": true,
|
|
284
|
-
* "maxResults": 50,
|
|
285
|
-
* "startAt": 0,
|
|
286
|
-
* "total": 3,
|
|
287
|
-
* "values": [
|
|
288
|
-
* {
|
|
289
|
-
* "description": "Serious problem that could block progress.",
|
|
290
|
-
* "iconUrl": "/images/icons/priorities/high.svg",
|
|
291
|
-
* "id": "1",
|
|
292
|
-
* "isDefault": false,
|
|
293
|
-
* "name": "High",
|
|
294
|
-
* "statusColor": "#f15C75"
|
|
295
|
-
* },
|
|
296
|
-
* {
|
|
297
|
-
* "description": "Has the potential to affect progress.",
|
|
298
|
-
* "iconUrl": "/images/icons/priorities/medium.svg",
|
|
299
|
-
* "id": "2",
|
|
300
|
-
* "isDefault": true,
|
|
301
|
-
* "name": "Medium",
|
|
302
|
-
* "statusColor": "#f79232"
|
|
303
|
-
* },
|
|
304
|
-
* {
|
|
305
|
-
* "description": "Minor problem or easily worked around.",
|
|
306
|
-
* "iconUrl": "/images/icons/priorities/low.svg",
|
|
307
|
-
* "id": "3",
|
|
308
|
-
* "isDefault": false,
|
|
309
|
-
* "name": "Low",
|
|
310
|
-
* "statusColor": "#707070"
|
|
311
|
-
* }
|
|
312
|
-
* ]
|
|
313
|
-
* }
|
|
314
|
-
* @path {GET} /rest/api/3/priorityscheme/{schemeId}/priorities
|
|
315
|
-
*/
|
|
316
|
-
getPrioritiesByPriorityScheme({
|
|
317
|
-
schemeId,
|
|
318
|
-
startAt,
|
|
319
|
-
maxResults,
|
|
320
|
-
}: {
|
|
321
|
-
/** The priority scheme ID. */
|
|
322
|
-
schemeId: string;
|
|
323
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
324
|
-
startAt?: string;
|
|
325
|
-
/** The maximum number of items to return per page. */
|
|
326
|
-
maxResults?: string;
|
|
327
|
-
}): Promise<PageBeanPriorityWithSequence> {
|
|
328
|
-
return this.getClientInstance()
|
|
329
|
-
.request({
|
|
330
|
-
path: "/rest/api/3/priorityscheme/{schemeId}/priorities",
|
|
331
|
-
method: "GET",
|
|
332
|
-
pathParams: {
|
|
333
|
-
schemeId,
|
|
334
|
-
},
|
|
335
|
-
query: {
|
|
336
|
-
startAt,
|
|
337
|
-
maxResults,
|
|
338
|
-
},
|
|
339
|
-
})
|
|
340
|
-
.then(
|
|
341
|
-
this.getClientInstance().responseHandler({
|
|
342
|
-
200: {
|
|
343
|
-
"application/json": "json",
|
|
344
|
-
},
|
|
345
|
-
}),
|
|
346
|
-
)
|
|
347
|
-
.then(
|
|
348
|
-
commonHttpClient.castResponse<{
|
|
349
|
-
status: 200;
|
|
350
|
-
mediaType: "application/json";
|
|
351
|
-
body: PageBeanPriorityWithSequence;
|
|
352
|
-
}>(),
|
|
353
|
-
)
|
|
354
|
-
.then(
|
|
355
|
-
validationSchemaStorage.validator(
|
|
356
|
-
"PrioritySchemesService.getPrioritiesByPriorityScheme.response",
|
|
357
|
-
),
|
|
358
|
-
)
|
|
359
|
-
.then(commonHttpClient.getBody);
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Returns a [paginated](#pagination) list of priority schemes.
|
|
363
|
-
*
|
|
364
|
-
* **[Permissions](#permissions) required:** Permission to access Jira.
|
|
365
|
-
*
|
|
366
|
-
* @returns Returned if the request is successful.
|
|
367
|
-
*
|
|
368
|
-
* example: {
|
|
369
|
-
* "isLast": true,
|
|
370
|
-
* "maxResults": 50,
|
|
371
|
-
* "startAt": 0,
|
|
372
|
-
* "total": 1,
|
|
373
|
-
* "values": [
|
|
374
|
-
* {
|
|
375
|
-
* "description": "This is the default scheme used by all new and unassigned
|
|
376
|
-
* projects",
|
|
377
|
-
* "id": "1",
|
|
378
|
-
* "isDefault": true,
|
|
379
|
-
* "name": "Default Priority Scheme",
|
|
380
|
-
* "priorities": {
|
|
381
|
-
* "isLast": true,
|
|
382
|
-
* "maxResults": 50,
|
|
383
|
-
* "startAt": 0,
|
|
384
|
-
* "total": 3,
|
|
385
|
-
* "values": [
|
|
386
|
-
* {
|
|
387
|
-
* "description": "Serious problem that could block progress.",
|
|
388
|
-
* "iconUrl": "/images/icons/priorities/high.svg",
|
|
389
|
-
* "id": "1",
|
|
390
|
-
* "isDefault": false,
|
|
391
|
-
* "name": "High",
|
|
392
|
-
* "statusColor": "#f15C75"
|
|
393
|
-
* },
|
|
394
|
-
* {
|
|
395
|
-
* "description": "Has the potential to affect progress.",
|
|
396
|
-
* "iconUrl": "/images/icons/priorities/medium.svg",
|
|
397
|
-
* "id": "2",
|
|
398
|
-
* "isDefault": true,
|
|
399
|
-
* "name": "Medium",
|
|
400
|
-
* "statusColor": "#f79232"
|
|
401
|
-
* },
|
|
402
|
-
* {
|
|
403
|
-
* "description": "Minor problem or easily worked around.",
|
|
404
|
-
* "iconUrl": "/images/icons/priorities/low.svg",
|
|
405
|
-
* "id": "3",
|
|
406
|
-
* "isDefault": false,
|
|
407
|
-
* "name": "Low",
|
|
408
|
-
* "statusColor": "#707070"
|
|
409
|
-
* }
|
|
410
|
-
* ]
|
|
411
|
-
* },
|
|
412
|
-
* "projects": {
|
|
413
|
-
* "isLast": true,
|
|
414
|
-
* "maxResults": 50,
|
|
415
|
-
* "startAt": 0,
|
|
416
|
-
* "total": 1,
|
|
417
|
-
* "values": [
|
|
418
|
-
* {
|
|
419
|
-
* "avatarUrls": {
|
|
420
|
-
* "16x16": "secure/projectavatar?size=xsmall&pid=10000",
|
|
421
|
-
* "24x24": "secure/projectavatar?size=small&pid=10000",
|
|
422
|
-
* "32x32": "secure/projectavatar?size=medium&pid=10000",
|
|
423
|
-
* "48x48": "secure/projectavatar?size=large&pid=10000"
|
|
424
|
-
* },
|
|
425
|
-
* "id": "10000",
|
|
426
|
-
* "key": "EX",
|
|
427
|
-
* "name": "Example",
|
|
428
|
-
* "projectCategory": {
|
|
429
|
-
* "description": "Project category description",
|
|
430
|
-
* "id": "10000",
|
|
431
|
-
* "name": "A project category"
|
|
432
|
-
* },
|
|
433
|
-
* "projectTypeKey": "ProjectTypeKey{key='software'}",
|
|
434
|
-
* "self": "project/EX",
|
|
435
|
-
* "simplified": false
|
|
436
|
-
* }
|
|
437
|
-
* ]
|
|
438
|
-
* }
|
|
439
|
-
* }
|
|
440
|
-
* ]
|
|
441
|
-
* }
|
|
442
|
-
* @path {GET} /rest/api/3/priorityscheme
|
|
443
|
-
*/
|
|
444
|
-
getPrioritySchemes({
|
|
445
|
-
startAt,
|
|
446
|
-
maxResults,
|
|
447
|
-
priorityId,
|
|
448
|
-
schemeId,
|
|
449
|
-
schemeName,
|
|
450
|
-
onlyDefault,
|
|
451
|
-
orderBy,
|
|
452
|
-
expand,
|
|
453
|
-
}: {
|
|
454
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
455
|
-
startAt?: string;
|
|
456
|
-
/** The maximum number of items to return per page. */
|
|
457
|
-
maxResults?: string;
|
|
458
|
-
/**
|
|
459
|
-
* A set of priority IDs to filter by. To include multiple IDs, provide an
|
|
460
|
-
* ampersand-separated list. For example, `priorityId=10000&priorityId=10001`.
|
|
461
|
-
*/
|
|
462
|
-
priorityId?: number[];
|
|
463
|
-
/**
|
|
464
|
-
* A set of priority scheme IDs. To include multiple IDs, provide an
|
|
465
|
-
* ampersand-separated list. For example, `schemeId=10000&schemeId=10001`.
|
|
466
|
-
*/
|
|
467
|
-
schemeId?: number[];
|
|
468
|
-
/** The name of scheme to search for. */
|
|
469
|
-
schemeName?: string;
|
|
470
|
-
/** Whether only the default priority is returned. */
|
|
471
|
-
onlyDefault?: boolean;
|
|
472
|
-
/** The ordering to return the priority schemes by. */
|
|
473
|
-
orderBy?: "name" | "+name" | "-name";
|
|
474
|
-
/**
|
|
475
|
-
* A comma separated list of additional information to return. "priorities" will
|
|
476
|
-
* return priorities associated with the priority scheme. "projects" will return
|
|
477
|
-
* projects associated with the priority scheme. `expand=priorities,projects`.
|
|
478
|
-
*/
|
|
479
|
-
expand?: string;
|
|
480
|
-
}): Promise<PageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects> {
|
|
481
|
-
return this.getClientInstance()
|
|
482
|
-
.request({
|
|
483
|
-
path: "/rest/api/3/priorityscheme",
|
|
484
|
-
method: "GET",
|
|
485
|
-
query: {
|
|
486
|
-
startAt,
|
|
487
|
-
maxResults,
|
|
488
|
-
priorityId,
|
|
489
|
-
schemeId,
|
|
490
|
-
schemeName,
|
|
491
|
-
onlyDefault,
|
|
492
|
-
orderBy,
|
|
493
|
-
expand,
|
|
494
|
-
},
|
|
495
|
-
})
|
|
496
|
-
.then(
|
|
497
|
-
this.getClientInstance().responseHandler({
|
|
498
|
-
200: {
|
|
499
|
-
"application/json": "json",
|
|
500
|
-
},
|
|
501
|
-
}),
|
|
502
|
-
)
|
|
503
|
-
.then(
|
|
504
|
-
commonHttpClient.castResponse<{
|
|
505
|
-
status: 200;
|
|
506
|
-
mediaType: "application/json";
|
|
507
|
-
body: PageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects;
|
|
508
|
-
}>(),
|
|
509
|
-
)
|
|
510
|
-
.then(
|
|
511
|
-
validationSchemaStorage.validator(
|
|
512
|
-
"PrioritySchemesService.getPrioritySchemes.response",
|
|
513
|
-
),
|
|
514
|
-
)
|
|
515
|
-
.then(commonHttpClient.getBody);
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* Returns a [paginated](#pagination) list of projects by scheme.
|
|
519
|
-
*
|
|
520
|
-
* **[Permissions](#permissions) required:** Permission to access Jira.
|
|
521
|
-
*
|
|
522
|
-
* @returns Returned if the request is successful.
|
|
523
|
-
*
|
|
524
|
-
* example: {
|
|
525
|
-
* "isLast": true,
|
|
526
|
-
* "maxResults": 50,
|
|
527
|
-
* "startAt": 0,
|
|
528
|
-
* "total": 1,
|
|
529
|
-
* "values": [
|
|
530
|
-
* {
|
|
531
|
-
* "avatarUrls": {
|
|
532
|
-
* "16x16": "secure/projectavatar?size=xsmall&pid=10000",
|
|
533
|
-
* "24x24": "secure/projectavatar?size=small&pid=10000",
|
|
534
|
-
* "32x32": "secure/projectavatar?size=medium&pid=10000",
|
|
535
|
-
* "48x48": "secure/projectavatar?size=large&pid=10000"
|
|
536
|
-
* },
|
|
537
|
-
* "id": "10000",
|
|
538
|
-
* "key": "EX",
|
|
539
|
-
* "name": "Example",
|
|
540
|
-
* "projectCategory": {
|
|
541
|
-
* "description": "Project category description",
|
|
542
|
-
* "id": "10000",
|
|
543
|
-
* "name": "A project category"
|
|
544
|
-
* },
|
|
545
|
-
* "projectTypeKey": "ProjectTypeKey{key='software'}",
|
|
546
|
-
* "self": "project/EX",
|
|
547
|
-
* "simplified": false
|
|
548
|
-
* }
|
|
549
|
-
* ]
|
|
550
|
-
* }
|
|
551
|
-
* @path {GET} /rest/api/3/priorityscheme/{schemeId}/projects
|
|
552
|
-
*/
|
|
553
|
-
getProjectsByPriorityScheme({
|
|
554
|
-
schemeId,
|
|
555
|
-
startAt,
|
|
556
|
-
maxResults,
|
|
557
|
-
projectId,
|
|
558
|
-
query,
|
|
559
|
-
}: {
|
|
560
|
-
/** The priority scheme ID. */
|
|
561
|
-
schemeId: string;
|
|
562
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
563
|
-
startAt?: string;
|
|
564
|
-
/** The maximum number of items to return per page. */
|
|
565
|
-
maxResults?: string;
|
|
566
|
-
/** The project IDs to filter by. For example, `projectId=10000&projectId=10001`. */
|
|
567
|
-
projectId?: number[];
|
|
568
|
-
/** The string to query projects on by name. */
|
|
569
|
-
query?: string;
|
|
570
|
-
}): Promise<PageBeanProject> {
|
|
571
|
-
return this.getClientInstance()
|
|
572
|
-
.request({
|
|
573
|
-
path: "/rest/api/3/priorityscheme/{schemeId}/projects",
|
|
574
|
-
method: "GET",
|
|
575
|
-
pathParams: {
|
|
576
|
-
schemeId,
|
|
577
|
-
},
|
|
578
|
-
query: {
|
|
579
|
-
startAt,
|
|
580
|
-
maxResults,
|
|
581
|
-
projectId,
|
|
582
|
-
query,
|
|
583
|
-
},
|
|
584
|
-
})
|
|
585
|
-
.then(
|
|
586
|
-
this.getClientInstance().responseHandler({
|
|
587
|
-
200: {
|
|
588
|
-
"application/json": "json",
|
|
589
|
-
},
|
|
590
|
-
}),
|
|
591
|
-
)
|
|
592
|
-
.then(
|
|
593
|
-
commonHttpClient.castResponse<{
|
|
594
|
-
status: 200;
|
|
595
|
-
mediaType: "application/json";
|
|
596
|
-
body: PageBeanProject;
|
|
597
|
-
}>(),
|
|
598
|
-
)
|
|
599
|
-
.then(
|
|
600
|
-
validationSchemaStorage.validator(
|
|
601
|
-
"PrioritySchemesService.getProjectsByPriorityScheme.response",
|
|
602
|
-
),
|
|
603
|
-
)
|
|
604
|
-
.then(commonHttpClient.getBody);
|
|
605
|
-
}
|
|
606
|
-
/**
|
|
607
|
-
* Returns a [paginated](#pagination) list of priorities that would require
|
|
608
|
-
* mapping, given a change in priorities or projects associated with a priority
|
|
609
|
-
* scheme.
|
|
610
|
-
*
|
|
611
|
-
* **[Permissions](#permissions) required:** Permission to access Jira.
|
|
612
|
-
*
|
|
613
|
-
* @returns Returned if the request is successful.
|
|
614
|
-
*
|
|
615
|
-
* example: {
|
|
616
|
-
* "isLast": true,
|
|
617
|
-
* "maxResults": 50,
|
|
618
|
-
* "startAt": 0,
|
|
619
|
-
* "total": 3,
|
|
620
|
-
* "values": [
|
|
621
|
-
* {
|
|
622
|
-
* "description": "Serious problem that could block progress.",
|
|
623
|
-
* "iconUrl": "/images/icons/priorities/high.svg",
|
|
624
|
-
* "id": "1",
|
|
625
|
-
* "isDefault": false,
|
|
626
|
-
* "name": "High",
|
|
627
|
-
* "statusColor": "#f15C75"
|
|
628
|
-
* },
|
|
629
|
-
* {
|
|
630
|
-
* "description": "Has the potential to affect progress.",
|
|
631
|
-
* "iconUrl": "/images/icons/priorities/medium.svg",
|
|
632
|
-
* "id": "2",
|
|
633
|
-
* "isDefault": true,
|
|
634
|
-
* "name": "Medium",
|
|
635
|
-
* "statusColor": "#f79232"
|
|
636
|
-
* },
|
|
637
|
-
* {
|
|
638
|
-
* "description": "Minor problem or easily worked around.",
|
|
639
|
-
* "iconUrl": "/images/icons/priorities/low.svg",
|
|
640
|
-
* "id": "3",
|
|
641
|
-
* "isDefault": false,
|
|
642
|
-
* "name": "Low",
|
|
643
|
-
* "statusColor": "#707070"
|
|
644
|
-
* }
|
|
645
|
-
* ]
|
|
646
|
-
* }
|
|
647
|
-
* @path {POST} /rest/api/3/priorityscheme/mappings
|
|
648
|
-
*/
|
|
649
|
-
suggestedPrioritiesForMappings({
|
|
650
|
-
suggestedMappingsRequestBean,
|
|
651
|
-
}: {
|
|
652
|
-
/**
|
|
653
|
-
* @example {
|
|
654
|
-
* "maxResults": 50,
|
|
655
|
-
* "priorities": {
|
|
656
|
-
* "add": [
|
|
657
|
-
* 10001,
|
|
658
|
-
* 10002
|
|
659
|
-
* ],
|
|
660
|
-
* "remove": [
|
|
661
|
-
* 10003
|
|
662
|
-
* ]
|
|
663
|
-
* },
|
|
664
|
-
* "projects": {
|
|
665
|
-
* "add": [
|
|
666
|
-
* 10021
|
|
667
|
-
* ]
|
|
668
|
-
* },
|
|
669
|
-
* "schemeId": 10005,
|
|
670
|
-
* "startAt": 0
|
|
671
|
-
* }
|
|
672
|
-
*/
|
|
673
|
-
suggestedMappingsRequestBean: SuggestedMappingsRequestBean;
|
|
674
|
-
}): Promise<PageBeanPriorityWithSequence> {
|
|
675
|
-
return this.getClientInstance()
|
|
676
|
-
.request({
|
|
677
|
-
path: "/rest/api/3/priorityscheme/mappings",
|
|
678
|
-
method: "POST",
|
|
679
|
-
headers: {
|
|
680
|
-
"Content-Type": "application/json",
|
|
681
|
-
},
|
|
682
|
-
body: suggestedMappingsRequestBean,
|
|
683
|
-
})
|
|
684
|
-
.then(
|
|
685
|
-
this.getClientInstance().responseHandler({
|
|
686
|
-
200: {
|
|
687
|
-
"application/json": "json",
|
|
688
|
-
},
|
|
689
|
-
}),
|
|
690
|
-
)
|
|
691
|
-
.then(
|
|
692
|
-
commonHttpClient.castResponse<{
|
|
693
|
-
status: 200;
|
|
694
|
-
mediaType: "application/json";
|
|
695
|
-
body: PageBeanPriorityWithSequence;
|
|
696
|
-
}>(),
|
|
697
|
-
)
|
|
698
|
-
.then(
|
|
699
|
-
validationSchemaStorage.validator(
|
|
700
|
-
"PrioritySchemesService.suggestedPrioritiesForMappings.response",
|
|
701
|
-
),
|
|
702
|
-
)
|
|
703
|
-
.then(commonHttpClient.getBody);
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* Updates a priority scheme. This includes its details, the lists of priorities
|
|
707
|
-
* and projects in it
|
|
708
|
-
*
|
|
709
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
710
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
711
|
-
*
|
|
712
|
-
* @returns Returned if the request is accepted.
|
|
713
|
-
*
|
|
714
|
-
* example: {
|
|
715
|
-
* "task": {
|
|
716
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/task/1",
|
|
717
|
-
* "id": "1",
|
|
718
|
-
* "description": "Task description",
|
|
719
|
-
* "status": "COMPLETE",
|
|
720
|
-
* "result": "the task result, this may be any JSON",
|
|
721
|
-
* "submittedBy": 10000,
|
|
722
|
-
* "progress": 100,
|
|
723
|
-
* "elapsedRuntime": 156,
|
|
724
|
-
* "submitted": 1501708132800,
|
|
725
|
-
* "started": 1501708132900,
|
|
726
|
-
* "finished": 1501708133000,
|
|
727
|
-
* "lastUpdate": 1501708133000
|
|
728
|
-
* },
|
|
729
|
-
* "updated": {
|
|
730
|
-
* "description": "This is the default scheme used by all new and unassigned
|
|
731
|
-
* projects",
|
|
732
|
-
* "id": "1",
|
|
733
|
-
* "isDefault": true,
|
|
734
|
-
* "name": "Default Priority Scheme",
|
|
735
|
-
* "priorities": {
|
|
736
|
-
* "isLast": true,
|
|
737
|
-
* "maxResults": 50,
|
|
738
|
-
* "startAt": 0,
|
|
739
|
-
* "total": 3,
|
|
740
|
-
* "values": [
|
|
741
|
-
* {
|
|
742
|
-
* "description": "Serious problem that could block progress.",
|
|
743
|
-
* "iconUrl": "/images/icons/priorities/high.svg",
|
|
744
|
-
* "id": "1",
|
|
745
|
-
* "isDefault": false,
|
|
746
|
-
* "name": "High",
|
|
747
|
-
* "statusColor": "#f15C75"
|
|
748
|
-
* },
|
|
749
|
-
* {
|
|
750
|
-
* "description": "Has the potential to affect progress.",
|
|
751
|
-
* "iconUrl": "/images/icons/priorities/medium.svg",
|
|
752
|
-
* "id": "2",
|
|
753
|
-
* "isDefault": true,
|
|
754
|
-
* "name": "Medium",
|
|
755
|
-
* "statusColor": "#f79232"
|
|
756
|
-
* },
|
|
757
|
-
* {
|
|
758
|
-
* "description": "Minor problem or easily worked around.",
|
|
759
|
-
* "iconUrl": "/images/icons/priorities/low.svg",
|
|
760
|
-
* "id": "3",
|
|
761
|
-
* "isDefault": false,
|
|
762
|
-
* "name": "Low",
|
|
763
|
-
* "statusColor": "#707070"
|
|
764
|
-
* }
|
|
765
|
-
* ]
|
|
766
|
-
* },
|
|
767
|
-
* "projects": {
|
|
768
|
-
* "isLast": true,
|
|
769
|
-
* "maxResults": 50,
|
|
770
|
-
* "startAt": 0,
|
|
771
|
-
* "total": 1,
|
|
772
|
-
* "values": [
|
|
773
|
-
* {
|
|
774
|
-
* "avatarUrls": {
|
|
775
|
-
* "16x16": "secure/projectavatar?size=xsmall&pid=10000",
|
|
776
|
-
* "24x24": "secure/projectavatar?size=small&pid=10000",
|
|
777
|
-
* "32x32": "secure/projectavatar?size=medium&pid=10000",
|
|
778
|
-
* "48x48": "secure/projectavatar?size=large&pid=10000"
|
|
779
|
-
* },
|
|
780
|
-
* "id": "10000",
|
|
781
|
-
* "key": "EX",
|
|
782
|
-
* "name": "Example",
|
|
783
|
-
* "projectCategory": {
|
|
784
|
-
* "description": "Project category description",
|
|
785
|
-
* "id": "10000",
|
|
786
|
-
* "name": "A project category"
|
|
787
|
-
* },
|
|
788
|
-
* "projectTypeKey": "ProjectTypeKey{key='software'}",
|
|
789
|
-
* "self": "project/EX",
|
|
790
|
-
* "simplified": false
|
|
791
|
-
* }
|
|
792
|
-
* ]
|
|
793
|
-
* }
|
|
794
|
-
* }
|
|
795
|
-
* }
|
|
796
|
-
* @path {PUT} /rest/api/3/priorityscheme/{schemeId}
|
|
797
|
-
*/
|
|
798
|
-
updatePriorityScheme({
|
|
799
|
-
schemeId,
|
|
800
|
-
updatePrioritySchemeRequestBean,
|
|
801
|
-
}: {
|
|
802
|
-
/** The ID of the priority scheme. */
|
|
803
|
-
schemeId: number;
|
|
804
|
-
/**
|
|
805
|
-
* @example {
|
|
806
|
-
* "defaultPriorityId": 10001,
|
|
807
|
-
* "description": "My priority scheme description",
|
|
808
|
-
* "mappings": {
|
|
809
|
-
* "in": {
|
|
810
|
-
* "10005": 10002
|
|
811
|
-
* },
|
|
812
|
-
* "out": {
|
|
813
|
-
* "10004": 10001
|
|
814
|
-
* }
|
|
815
|
-
* },
|
|
816
|
-
* "name": "My new priority scheme",
|
|
817
|
-
* "priorities": {
|
|
818
|
-
* "add": {
|
|
819
|
-
* "ids": [
|
|
820
|
-
* 10001,
|
|
821
|
-
* 10002
|
|
822
|
-
* ]
|
|
823
|
-
* },
|
|
824
|
-
* "remove": {
|
|
825
|
-
* "ids": [
|
|
826
|
-
* 10003,
|
|
827
|
-
* 10004
|
|
828
|
-
* ],
|
|
829
|
-
* "mappings": [
|
|
830
|
-
* {
|
|
831
|
-
* "in": {
|
|
832
|
-
* "10001": 10011
|
|
833
|
-
* },
|
|
834
|
-
* "out": {
|
|
835
|
-
* "10012": 10002
|
|
836
|
-
* }
|
|
837
|
-
* }
|
|
838
|
-
* ]
|
|
839
|
-
* }
|
|
840
|
-
* },
|
|
841
|
-
* "projects": {
|
|
842
|
-
* "add": {
|
|
843
|
-
* "ids": [
|
|
844
|
-
* 10101,
|
|
845
|
-
* 10102
|
|
846
|
-
* ]
|
|
847
|
-
* },
|
|
848
|
-
* "remove": {
|
|
849
|
-
* "ids": [
|
|
850
|
-
* 10103,
|
|
851
|
-
* 10104
|
|
852
|
-
* ]
|
|
853
|
-
* }
|
|
854
|
-
* }
|
|
855
|
-
* }
|
|
856
|
-
*/
|
|
857
|
-
updatePrioritySchemeRequestBean: UpdatePrioritySchemeRequestBean;
|
|
858
|
-
}): Promise<UpdatePrioritySchemeResponseBean> {
|
|
859
|
-
return this.getClientInstance()
|
|
860
|
-
.request({
|
|
861
|
-
path: "/rest/api/3/priorityscheme/{schemeId}",
|
|
862
|
-
method: "PUT",
|
|
863
|
-
pathParams: {
|
|
864
|
-
schemeId,
|
|
865
|
-
},
|
|
866
|
-
headers: {
|
|
867
|
-
"Content-Type": "application/json",
|
|
868
|
-
},
|
|
869
|
-
body: updatePrioritySchemeRequestBean,
|
|
870
|
-
})
|
|
871
|
-
.then(
|
|
872
|
-
this.getClientInstance().responseHandler({
|
|
873
|
-
202: {
|
|
874
|
-
"application/json": "json",
|
|
875
|
-
},
|
|
876
|
-
}),
|
|
877
|
-
)
|
|
878
|
-
.then(
|
|
879
|
-
commonHttpClient.castResponse<{
|
|
880
|
-
status: 202;
|
|
881
|
-
mediaType: "application/json";
|
|
882
|
-
body: UpdatePrioritySchemeResponseBean;
|
|
883
|
-
}>(),
|
|
884
|
-
)
|
|
885
|
-
.then(
|
|
886
|
-
validationSchemaStorage.validator(
|
|
887
|
-
"PrioritySchemesService.updatePriorityScheme.response",
|
|
888
|
-
),
|
|
889
|
-
)
|
|
890
|
-
.then(commonHttpClient.getBody);
|
|
891
|
-
}
|
|
892
|
-
static initialize() {
|
|
893
|
-
validationSchemaStorage.registerExtensible(
|
|
894
|
-
"PrioritySchemesService.getPrioritySchemes.response",
|
|
895
|
-
z
|
|
896
|
-
.object({
|
|
897
|
-
status: z.literal(200),
|
|
898
|
-
mediaType: z.literal("application/json"),
|
|
899
|
-
body: validationSchemaStorage.lazy(
|
|
900
|
-
"PageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects",
|
|
901
|
-
),
|
|
902
|
-
})
|
|
903
|
-
.describe("PrioritySchemesService.getPrioritySchemes.response"),
|
|
904
|
-
);
|
|
905
|
-
validationSchemaStorage.registerExtensible(
|
|
906
|
-
"PrioritySchemesService.createPriorityScheme.response",
|
|
907
|
-
z
|
|
908
|
-
.object({
|
|
909
|
-
status: z.number(),
|
|
910
|
-
mediaType: z.string(),
|
|
911
|
-
body: z.unknown(),
|
|
912
|
-
})
|
|
913
|
-
.superRefine(({ status: status, body: body }, ctx) => {
|
|
914
|
-
if (status === 201 || status === 202) {
|
|
915
|
-
validationSchemaStorage.lazy("PrioritySchemeId").parse(body);
|
|
916
|
-
} else {
|
|
917
|
-
ctx.addIssue({
|
|
918
|
-
code: z.ZodIssueCode.custom,
|
|
919
|
-
path: ["status"],
|
|
920
|
-
message: `Unexpected status code: ${status}`,
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
})
|
|
924
|
-
.describe("PrioritySchemesService.createPriorityScheme.response"),
|
|
925
|
-
);
|
|
926
|
-
validationSchemaStorage.registerExtensible(
|
|
927
|
-
"PrioritySchemesService.updatePriorityScheme.response",
|
|
928
|
-
z
|
|
929
|
-
.object({
|
|
930
|
-
status: z.literal(202),
|
|
931
|
-
mediaType: z.literal("application/json"),
|
|
932
|
-
body: validationSchemaStorage.lazy(
|
|
933
|
-
"UpdatePrioritySchemeResponseBean",
|
|
934
|
-
),
|
|
935
|
-
})
|
|
936
|
-
.describe("PrioritySchemesService.updatePriorityScheme.response"),
|
|
937
|
-
);
|
|
938
|
-
validationSchemaStorage.registerExtensible(
|
|
939
|
-
"PrioritySchemesService.deletePriorityScheme.response",
|
|
940
|
-
z
|
|
941
|
-
.object({
|
|
942
|
-
status: z.literal(204),
|
|
943
|
-
mediaType: z.literal("application/json"),
|
|
944
|
-
body: z.unknown(),
|
|
945
|
-
})
|
|
946
|
-
.describe("PrioritySchemesService.deletePriorityScheme.response"),
|
|
947
|
-
);
|
|
948
|
-
validationSchemaStorage.registerExtensible(
|
|
949
|
-
"PrioritySchemesService.getPrioritiesByPriorityScheme.response",
|
|
950
|
-
z
|
|
951
|
-
.object({
|
|
952
|
-
status: z.literal(200),
|
|
953
|
-
mediaType: z.literal("application/json"),
|
|
954
|
-
body: validationSchemaStorage.lazy("PageBeanPriorityWithSequence"),
|
|
955
|
-
})
|
|
956
|
-
.describe(
|
|
957
|
-
"PrioritySchemesService.getPrioritiesByPriorityScheme.response",
|
|
958
|
-
),
|
|
959
|
-
);
|
|
960
|
-
validationSchemaStorage.registerExtensible(
|
|
961
|
-
"PrioritySchemesService.getProjectsByPriorityScheme.response",
|
|
962
|
-
z
|
|
963
|
-
.object({
|
|
964
|
-
status: z.literal(200),
|
|
965
|
-
mediaType: z.literal("application/json"),
|
|
966
|
-
body: validationSchemaStorage.lazy("PageBeanProject"),
|
|
967
|
-
})
|
|
968
|
-
.describe(
|
|
969
|
-
"PrioritySchemesService.getProjectsByPriorityScheme.response",
|
|
970
|
-
),
|
|
971
|
-
);
|
|
972
|
-
validationSchemaStorage.registerExtensible(
|
|
973
|
-
"PrioritySchemesService.suggestedPrioritiesForMappings.response",
|
|
974
|
-
z
|
|
975
|
-
.object({
|
|
976
|
-
status: z.literal(200),
|
|
977
|
-
mediaType: z.literal("application/json"),
|
|
978
|
-
body: validationSchemaStorage.lazy("PageBeanPriorityWithSequence"),
|
|
979
|
-
})
|
|
980
|
-
.describe(
|
|
981
|
-
"PrioritySchemesService.suggestedPrioritiesForMappings.response",
|
|
982
|
-
),
|
|
983
|
-
);
|
|
984
|
-
validationSchemaStorage.registerExtensible(
|
|
985
|
-
"PrioritySchemesService.getAvailablePrioritiesByPriorityScheme.response",
|
|
986
|
-
z
|
|
987
|
-
.object({
|
|
988
|
-
status: z.literal(200),
|
|
989
|
-
mediaType: z.literal("application/json"),
|
|
990
|
-
body: validationSchemaStorage.lazy("PageBeanPriorityWithSequence"),
|
|
991
|
-
})
|
|
992
|
-
.describe(
|
|
993
|
-
"PrioritySchemesService.getAvailablePrioritiesByPriorityScheme.response",
|
|
994
|
-
),
|
|
995
|
-
);
|
|
996
|
-
validationSchemaStorage.registerOnce([
|
|
997
|
-
registerPrioritySchemesValidationSchemas,
|
|
998
|
-
registerCommonValidationSchemas,
|
|
999
|
-
]);
|
|
1000
|
-
}
|
|
1001
|
-
}
|