@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,969 +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 { validationSchemaStorage } from "../validation-schema-storage";
|
|
9
|
-
/** Apis related to sprints */
|
|
10
|
-
export class SprintService extends CommonHttpService {
|
|
11
|
-
/**
|
|
12
|
-
* Creates a future sprint. Sprint name and origin board id are required. Start
|
|
13
|
-
* date, end date, and goal are optional.
|
|
14
|
-
*
|
|
15
|
-
* Note that the sprint name is trimmed. Also, when starting sprints from the UI,
|
|
16
|
-
* the "endDate" set through this call is ignored and instead the last sprint's
|
|
17
|
-
* duration is used to fill the form.
|
|
18
|
-
*
|
|
19
|
-
* @returns Created sprint
|
|
20
|
-
*
|
|
21
|
-
* example: {
|
|
22
|
-
* "id": 37,
|
|
23
|
-
* "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/23",
|
|
24
|
-
* "state": "future",
|
|
25
|
-
* "name": "sprint 1",
|
|
26
|
-
* "startDate": "2015-04-11T15:22:00.000+10:00",
|
|
27
|
-
* "endDate": "2015-04-20T01:22:00.000+10:00",
|
|
28
|
-
* "originBoardId": 5,
|
|
29
|
-
* "goal": "sprint 1 goal"
|
|
30
|
-
* }
|
|
31
|
-
* @path {POST} /rest/agile/1.0/sprint
|
|
32
|
-
*/
|
|
33
|
-
createSprint({
|
|
34
|
-
requestBody,
|
|
35
|
-
}: {
|
|
36
|
-
/**
|
|
37
|
-
* @example {
|
|
38
|
-
* "endDate": "2015-04-20T01:22:00.000+10:00",
|
|
39
|
-
* "goal": "sprint 1 goal",
|
|
40
|
-
* "name": "sprint 1",
|
|
41
|
-
* "originBoardId": 5,
|
|
42
|
-
* "startDate": "2015-04-11T15:22:00.000+10:00"
|
|
43
|
-
* }
|
|
44
|
-
*/
|
|
45
|
-
requestBody: {
|
|
46
|
-
endDate?: string;
|
|
47
|
-
goal?: string;
|
|
48
|
-
name?: string;
|
|
49
|
-
originBoardId?: number;
|
|
50
|
-
startDate?: string;
|
|
51
|
-
};
|
|
52
|
-
}): Promise<unknown> {
|
|
53
|
-
return this.getClientInstance()
|
|
54
|
-
.request({
|
|
55
|
-
path: "/rest/agile/1.0/sprint",
|
|
56
|
-
method: "POST",
|
|
57
|
-
headers: {
|
|
58
|
-
"Content-Type": "application/json",
|
|
59
|
-
},
|
|
60
|
-
body: requestBody,
|
|
61
|
-
})
|
|
62
|
-
.then(
|
|
63
|
-
this.getClientInstance().responseHandler({
|
|
64
|
-
201: {
|
|
65
|
-
"application/json": "json",
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
|
-
)
|
|
69
|
-
.then(
|
|
70
|
-
commonHttpClient.castResponse<{
|
|
71
|
-
status: 201;
|
|
72
|
-
mediaType: "application/json";
|
|
73
|
-
body: unknown;
|
|
74
|
-
}>(),
|
|
75
|
-
)
|
|
76
|
-
.then(
|
|
77
|
-
validationSchemaStorage.validator(
|
|
78
|
-
"SprintService.createSprint.response",
|
|
79
|
-
),
|
|
80
|
-
)
|
|
81
|
-
.then(commonHttpClient.getBody);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Removes the property from the sprint identified by the id. Ths user removing
|
|
85
|
-
* the property is required to have permissions to modify the sprint.
|
|
86
|
-
*
|
|
87
|
-
* @path {DELETE} /rest/agile/1.0/sprint/{sprintId}/properties/{propertyKey}
|
|
88
|
-
*/
|
|
89
|
-
deleteProperty({
|
|
90
|
-
sprintId,
|
|
91
|
-
propertyKey,
|
|
92
|
-
}: {
|
|
93
|
-
/** the ID of the sprint from which the property will be removed. */
|
|
94
|
-
sprintId: string;
|
|
95
|
-
/** the key of the property to remove. */
|
|
96
|
-
propertyKey: string;
|
|
97
|
-
}): Promise<void> {
|
|
98
|
-
return this.getClientInstance()
|
|
99
|
-
.request({
|
|
100
|
-
path: "/rest/agile/1.0/sprint/{sprintId}/properties/{propertyKey}",
|
|
101
|
-
method: "DELETE",
|
|
102
|
-
pathParams: {
|
|
103
|
-
sprintId,
|
|
104
|
-
propertyKey,
|
|
105
|
-
},
|
|
106
|
-
})
|
|
107
|
-
.then(commonHttpClient.discardResult);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Deletes a sprint. Once a sprint is deleted, all open issues in the sprint will
|
|
111
|
-
* be moved to the backlog.
|
|
112
|
-
*
|
|
113
|
-
* @path {DELETE} /rest/agile/1.0/sprint/{sprintId}
|
|
114
|
-
*/
|
|
115
|
-
deleteSprint({
|
|
116
|
-
sprintId,
|
|
117
|
-
}: {
|
|
118
|
-
/** The ID of the sprint to delete. */
|
|
119
|
-
sprintId: number;
|
|
120
|
-
}): Promise<void> {
|
|
121
|
-
return this.getClientInstance()
|
|
122
|
-
.request({
|
|
123
|
-
path: "/rest/agile/1.0/sprint/{sprintId}",
|
|
124
|
-
method: "DELETE",
|
|
125
|
-
pathParams: {
|
|
126
|
-
sprintId,
|
|
127
|
-
},
|
|
128
|
-
})
|
|
129
|
-
.then(commonHttpClient.discardResult);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Returns all issues in a sprint, for a given sprint ID. This only includes
|
|
133
|
-
* issues that the user has permission to view. By default, the returned issues
|
|
134
|
-
* are ordered by rank.
|
|
135
|
-
*
|
|
136
|
-
* @returns Returns the requested issues, at the specified page of the results.
|
|
137
|
-
*
|
|
138
|
-
* example: {
|
|
139
|
-
* "expand": "",
|
|
140
|
-
* "fields": {
|
|
141
|
-
* "flagged": true,
|
|
142
|
-
* "sprint": {
|
|
143
|
-
* "id": 37,
|
|
144
|
-
* "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/13",
|
|
145
|
-
* "state": "future",
|
|
146
|
-
* "name": "sprint 2",
|
|
147
|
-
* "goal": "sprint 2 goal"
|
|
148
|
-
* },
|
|
149
|
-
* "closedSprints": [
|
|
150
|
-
* {
|
|
151
|
-
* "id": 37,
|
|
152
|
-
* "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/23",
|
|
153
|
-
* "state": "closed",
|
|
154
|
-
* "name": "sprint 1",
|
|
155
|
-
* "startDate": "2015-04-11T15:22:00.000+10:00",
|
|
156
|
-
* "endDate": "2015-04-20T01:22:00.000+10:00",
|
|
157
|
-
* "completeDate": "2015-04-20T11:04:00.000+10:00",
|
|
158
|
-
* "goal": "sprint 1 goal"
|
|
159
|
-
* }
|
|
160
|
-
* ],
|
|
161
|
-
* "description": "example bug report",
|
|
162
|
-
* "project": {
|
|
163
|
-
* "avatarUrls": {
|
|
164
|
-
* "16x16":
|
|
165
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
166
|
-
* "24x24":
|
|
167
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
168
|
-
* "32x32":
|
|
169
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
170
|
-
* "48x48":
|
|
171
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
172
|
-
* },
|
|
173
|
-
* "id": "10000",
|
|
174
|
-
* "insight": {
|
|
175
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
176
|
-
* "totalIssueCount": 100
|
|
177
|
-
* },
|
|
178
|
-
* "key": "EX",
|
|
179
|
-
* "name": "Example",
|
|
180
|
-
* "projectCategory": {
|
|
181
|
-
* "description": "First Project Category",
|
|
182
|
-
* "id": "10000",
|
|
183
|
-
* "name": "FIRST",
|
|
184
|
-
* "self":
|
|
185
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
186
|
-
* },
|
|
187
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
188
|
-
* "simplified": false,
|
|
189
|
-
* "style": "classic"
|
|
190
|
-
* },
|
|
191
|
-
* "comment": [
|
|
192
|
-
* {
|
|
193
|
-
* "author": {
|
|
194
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
195
|
-
* "active": false,
|
|
196
|
-
* "displayName": "Mia Krystof",
|
|
197
|
-
* "self":
|
|
198
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
199
|
-
* },
|
|
200
|
-
* "body": {
|
|
201
|
-
* "type": "doc",
|
|
202
|
-
* "version": 1,
|
|
203
|
-
* "content": [
|
|
204
|
-
* {
|
|
205
|
-
* "type": "paragraph",
|
|
206
|
-
* "content": [
|
|
207
|
-
* {
|
|
208
|
-
* "type": "text",
|
|
209
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur adipiscing
|
|
210
|
-
* elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis
|
|
211
|
-
* fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper."
|
|
212
|
-
* }
|
|
213
|
-
* ]
|
|
214
|
-
* }
|
|
215
|
-
* ]
|
|
216
|
-
* },
|
|
217
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
218
|
-
* "id": "10000",
|
|
219
|
-
* "self":
|
|
220
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
221
|
-
* "updateAuthor": {
|
|
222
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
223
|
-
* "active": false,
|
|
224
|
-
* "displayName": "Mia Krystof",
|
|
225
|
-
* "self":
|
|
226
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
227
|
-
* },
|
|
228
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
229
|
-
* "visibility": {
|
|
230
|
-
* "identifier": "Administrators",
|
|
231
|
-
* "type": "role",
|
|
232
|
-
* "value": "Administrators"
|
|
233
|
-
* }
|
|
234
|
-
* }
|
|
235
|
-
* ],
|
|
236
|
-
* "epic": {
|
|
237
|
-
* "id": 37,
|
|
238
|
-
* "self": "https://your-domain.atlassian.net/rest/agile/1.0/epic/23",
|
|
239
|
-
* "name": "epic 1",
|
|
240
|
-
* "summary": "epic 1 summary",
|
|
241
|
-
* "color": {
|
|
242
|
-
* "key": "color_4"
|
|
243
|
-
* },
|
|
244
|
-
* "done": true
|
|
245
|
-
* },
|
|
246
|
-
* "worklog": [
|
|
247
|
-
* {
|
|
248
|
-
* "author": {
|
|
249
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
250
|
-
* "active": false,
|
|
251
|
-
* "displayName": "Mia Krystof",
|
|
252
|
-
* "self":
|
|
253
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
254
|
-
* },
|
|
255
|
-
* "comment": {
|
|
256
|
-
* "type": "doc",
|
|
257
|
-
* "version": 1,
|
|
258
|
-
* "content": [
|
|
259
|
-
* {
|
|
260
|
-
* "type": "paragraph",
|
|
261
|
-
* "content": [
|
|
262
|
-
* {
|
|
263
|
-
* "type": "text",
|
|
264
|
-
* "text": "I did some work here."
|
|
265
|
-
* }
|
|
266
|
-
* ]
|
|
267
|
-
* }
|
|
268
|
-
* ]
|
|
269
|
-
* },
|
|
270
|
-
* "id": "100028",
|
|
271
|
-
* "issueId": "10002",
|
|
272
|
-
* "self":
|
|
273
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
|
|
274
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
275
|
-
* "timeSpent": "3h 20m",
|
|
276
|
-
* "timeSpentSeconds": 12000,
|
|
277
|
-
* "updateAuthor": {
|
|
278
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
279
|
-
* "active": false,
|
|
280
|
-
* "displayName": "Mia Krystof",
|
|
281
|
-
* "self":
|
|
282
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
283
|
-
* },
|
|
284
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
285
|
-
* "visibility": {
|
|
286
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
287
|
-
* "type": "group",
|
|
288
|
-
* "value": "jira-developers"
|
|
289
|
-
* }
|
|
290
|
-
* }
|
|
291
|
-
* ],
|
|
292
|
-
* "updated": 1,
|
|
293
|
-
* "timetracking": {
|
|
294
|
-
* "originalEstimate": "10m",
|
|
295
|
-
* "originalEstimateSeconds": 600,
|
|
296
|
-
* "remainingEstimate": "3m",
|
|
297
|
-
* "remainingEstimateSeconds": 200,
|
|
298
|
-
* "timeSpent": "6m",
|
|
299
|
-
* "timeSpentSeconds": 400
|
|
300
|
-
* }
|
|
301
|
-
* },
|
|
302
|
-
* "id": "10001",
|
|
303
|
-
* "key": "HSP-1",
|
|
304
|
-
* "self":
|
|
305
|
-
* "https://your-domain.atlassian.net/rest/agile/1.0/board/92/issue/10001"
|
|
306
|
-
* }
|
|
307
|
-
* @path {GET} /rest/agile/1.0/sprint/{sprintId}/issue
|
|
308
|
-
*/
|
|
309
|
-
getIssuesForSprint({
|
|
310
|
-
sprintId,
|
|
311
|
-
startAt,
|
|
312
|
-
maxResults,
|
|
313
|
-
jql,
|
|
314
|
-
validateQuery,
|
|
315
|
-
fields,
|
|
316
|
-
expand,
|
|
317
|
-
}: {
|
|
318
|
-
/** The ID of the sprint that contains the requested issues. */
|
|
319
|
-
sprintId: number;
|
|
320
|
-
/**
|
|
321
|
-
* The starting index of the returned issues. Base index: 0. See the 'Pagination'
|
|
322
|
-
* section at the top of this page for more details.
|
|
323
|
-
*/
|
|
324
|
-
startAt?: number;
|
|
325
|
-
/**
|
|
326
|
-
* The maximum number of issues to return per page. See the 'Pagination' section
|
|
327
|
-
* at the top of this page for more details. Note, the total number of issues
|
|
328
|
-
* returned is limited by the property 'jira.search.views.default.max' in your
|
|
329
|
-
* Jira instance. If you exceed this limit, your results will be truncated.
|
|
330
|
-
*/
|
|
331
|
-
maxResults?: number;
|
|
332
|
-
/**
|
|
333
|
-
* Filters results using a JQL query. If you define an order in your JQL query, it
|
|
334
|
-
* will override the default order of the returned issues.
|
|
335
|
-
* Note that `username` and `userkey` can't be used as search terms for this
|
|
336
|
-
* parameter due to privacy reasons. Use `accountId` instead.
|
|
337
|
-
*/
|
|
338
|
-
jql?: string;
|
|
339
|
-
/** Specifies whether to validate the JQL query or not. Default: true. */
|
|
340
|
-
validateQuery?: boolean;
|
|
341
|
-
/**
|
|
342
|
-
* The list of fields to return for each issue. By default, all navigable and
|
|
343
|
-
* Agile fields are returned.
|
|
344
|
-
*/
|
|
345
|
-
fields?: {}[];
|
|
346
|
-
/** A comma-separated list of the parameters to expand. */
|
|
347
|
-
expand?: string;
|
|
348
|
-
}): Promise<unknown> {
|
|
349
|
-
return this.getClientInstance()
|
|
350
|
-
.request({
|
|
351
|
-
path: "/rest/agile/1.0/sprint/{sprintId}/issue",
|
|
352
|
-
method: "GET",
|
|
353
|
-
pathParams: {
|
|
354
|
-
sprintId,
|
|
355
|
-
},
|
|
356
|
-
query: {
|
|
357
|
-
startAt,
|
|
358
|
-
maxResults,
|
|
359
|
-
jql,
|
|
360
|
-
validateQuery,
|
|
361
|
-
fields,
|
|
362
|
-
expand,
|
|
363
|
-
},
|
|
364
|
-
})
|
|
365
|
-
.then(
|
|
366
|
-
this.getClientInstance().responseHandler({
|
|
367
|
-
200: {
|
|
368
|
-
"application/json": "json",
|
|
369
|
-
},
|
|
370
|
-
}),
|
|
371
|
-
)
|
|
372
|
-
.then(
|
|
373
|
-
commonHttpClient.castResponse<{
|
|
374
|
-
status: 200;
|
|
375
|
-
mediaType: "application/json";
|
|
376
|
-
body: unknown;
|
|
377
|
-
}>(),
|
|
378
|
-
)
|
|
379
|
-
.then(
|
|
380
|
-
validationSchemaStorage.validator(
|
|
381
|
-
"SprintService.getIssuesForSprint.response",
|
|
382
|
-
),
|
|
383
|
-
)
|
|
384
|
-
.then(commonHttpClient.getBody);
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Returns the keys of all properties for the sprint identified by the id. The
|
|
388
|
-
* user who retrieves the property keys is required to have permissions to view
|
|
389
|
-
* the sprint.
|
|
390
|
-
*
|
|
391
|
-
* @returns Returned if the sprint with given id exists.
|
|
392
|
-
*
|
|
393
|
-
* example: {
|
|
394
|
-
* "keys": [
|
|
395
|
-
* {
|
|
396
|
-
* "key": "issue.support",
|
|
397
|
-
* "self":
|
|
398
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/EX-2/properties/issue.support"
|
|
399
|
-
* }
|
|
400
|
-
* ]
|
|
401
|
-
* }
|
|
402
|
-
* @path {GET} /rest/agile/1.0/sprint/{sprintId}/properties
|
|
403
|
-
*/
|
|
404
|
-
getPropertiesKeys({
|
|
405
|
-
sprintId,
|
|
406
|
-
}: {
|
|
407
|
-
/** the ID of the sprint from which property keys will be returned. */
|
|
408
|
-
sprintId: string;
|
|
409
|
-
}): Promise<unknown> {
|
|
410
|
-
return this.getClientInstance()
|
|
411
|
-
.request({
|
|
412
|
-
path: "/rest/agile/1.0/sprint/{sprintId}/properties",
|
|
413
|
-
method: "GET",
|
|
414
|
-
pathParams: {
|
|
415
|
-
sprintId,
|
|
416
|
-
},
|
|
417
|
-
})
|
|
418
|
-
.then(
|
|
419
|
-
this.getClientInstance().responseHandler({
|
|
420
|
-
200: {
|
|
421
|
-
"application/json": "json",
|
|
422
|
-
},
|
|
423
|
-
}),
|
|
424
|
-
)
|
|
425
|
-
.then(
|
|
426
|
-
commonHttpClient.castResponse<{
|
|
427
|
-
status: 200;
|
|
428
|
-
mediaType: "application/json";
|
|
429
|
-
body: unknown;
|
|
430
|
-
}>(),
|
|
431
|
-
)
|
|
432
|
-
.then(
|
|
433
|
-
validationSchemaStorage.validator(
|
|
434
|
-
"SprintService.getPropertiesKeys.response",
|
|
435
|
-
),
|
|
436
|
-
)
|
|
437
|
-
.then(commonHttpClient.getBody);
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* Returns the value of the property with a given key from the sprint identified
|
|
441
|
-
* by the provided id. The user who retrieves the property is required to have
|
|
442
|
-
* permissions to view the sprint.
|
|
443
|
-
*
|
|
444
|
-
* @returns Returned if the sprint exists and the property was found.
|
|
445
|
-
*
|
|
446
|
-
* example: {
|
|
447
|
-
* "key": "issue.support",
|
|
448
|
-
* "value": {
|
|
449
|
-
* "system.conversation.id": "b1bf38be-5e94-4b40-a3b8-9278735ee1e6",
|
|
450
|
-
* "system.support.time": "1m"
|
|
451
|
-
* }
|
|
452
|
-
* }
|
|
453
|
-
* @path {GET} /rest/agile/1.0/sprint/{sprintId}/properties/{propertyKey}
|
|
454
|
-
*/
|
|
455
|
-
getProperty({
|
|
456
|
-
sprintId,
|
|
457
|
-
propertyKey,
|
|
458
|
-
}: {
|
|
459
|
-
/** the ID of the sprint from which the property will be returned. */
|
|
460
|
-
sprintId: string;
|
|
461
|
-
/** the key of the property to return. */
|
|
462
|
-
propertyKey: string;
|
|
463
|
-
}): Promise<unknown> {
|
|
464
|
-
return this.getClientInstance()
|
|
465
|
-
.request({
|
|
466
|
-
path: "/rest/agile/1.0/sprint/{sprintId}/properties/{propertyKey}",
|
|
467
|
-
method: "GET",
|
|
468
|
-
pathParams: {
|
|
469
|
-
sprintId,
|
|
470
|
-
propertyKey,
|
|
471
|
-
},
|
|
472
|
-
})
|
|
473
|
-
.then(
|
|
474
|
-
this.getClientInstance().responseHandler({
|
|
475
|
-
200: {
|
|
476
|
-
"application/json": "json",
|
|
477
|
-
},
|
|
478
|
-
}),
|
|
479
|
-
)
|
|
480
|
-
.then(
|
|
481
|
-
commonHttpClient.castResponse<{
|
|
482
|
-
status: 200;
|
|
483
|
-
mediaType: "application/json";
|
|
484
|
-
body: unknown;
|
|
485
|
-
}>(),
|
|
486
|
-
)
|
|
487
|
-
.then(
|
|
488
|
-
validationSchemaStorage.validator("SprintService.getProperty.response"),
|
|
489
|
-
)
|
|
490
|
-
.then(commonHttpClient.getBody);
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* Returns the sprint for a given sprint ID. The sprint will only be returned if
|
|
494
|
-
* the user can view the board that the sprint was created on, or view at least
|
|
495
|
-
* one of the issues in the sprint.
|
|
496
|
-
*
|
|
497
|
-
* @returns Returns the requested sprint.
|
|
498
|
-
*
|
|
499
|
-
* example: {
|
|
500
|
-
* "id": 37,
|
|
501
|
-
* "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/23",
|
|
502
|
-
* "state": "closed",
|
|
503
|
-
* "name": "sprint 1",
|
|
504
|
-
* "startDate": "2015-04-11T15:22:00.000+10:00",
|
|
505
|
-
* "endDate": "2015-04-20T01:22:00.000+10:00",
|
|
506
|
-
* "completeDate": "2015-04-20T11:04:00.000+10:00",
|
|
507
|
-
* "originBoardId": 5,
|
|
508
|
-
* "goal": "sprint 1 goal"
|
|
509
|
-
* }
|
|
510
|
-
* @path {GET} /rest/agile/1.0/sprint/{sprintId}
|
|
511
|
-
*/
|
|
512
|
-
getSprint({
|
|
513
|
-
sprintId,
|
|
514
|
-
}: {
|
|
515
|
-
/** The ID of the requested sprint. */
|
|
516
|
-
sprintId: number;
|
|
517
|
-
}): Promise<unknown> {
|
|
518
|
-
return this.getClientInstance()
|
|
519
|
-
.request({
|
|
520
|
-
path: "/rest/agile/1.0/sprint/{sprintId}",
|
|
521
|
-
method: "GET",
|
|
522
|
-
pathParams: {
|
|
523
|
-
sprintId,
|
|
524
|
-
},
|
|
525
|
-
})
|
|
526
|
-
.then(
|
|
527
|
-
this.getClientInstance().responseHandler({
|
|
528
|
-
200: {
|
|
529
|
-
"application/json": "json",
|
|
530
|
-
},
|
|
531
|
-
}),
|
|
532
|
-
)
|
|
533
|
-
.then(
|
|
534
|
-
commonHttpClient.castResponse<{
|
|
535
|
-
status: 200;
|
|
536
|
-
mediaType: "application/json";
|
|
537
|
-
body: unknown;
|
|
538
|
-
}>(),
|
|
539
|
-
)
|
|
540
|
-
.then(
|
|
541
|
-
validationSchemaStorage.validator("SprintService.getSprint.response"),
|
|
542
|
-
)
|
|
543
|
-
.then(commonHttpClient.getBody);
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Moves issues to a sprint, for a given sprint ID. Issues can only be moved to
|
|
547
|
-
* open or active sprints. The maximum number of issues that can be moved in one
|
|
548
|
-
* operation is 50.
|
|
549
|
-
*
|
|
550
|
-
* @path {POST} /rest/agile/1.0/sprint/{sprintId}/issue
|
|
551
|
-
*/
|
|
552
|
-
moveIssuesToSprintAndRank({
|
|
553
|
-
sprintId,
|
|
554
|
-
requestBody,
|
|
555
|
-
}: {
|
|
556
|
-
/** The ID of the sprint that you want to assign issues to. */
|
|
557
|
-
sprintId: number;
|
|
558
|
-
/**
|
|
559
|
-
* @example {
|
|
560
|
-
* "issues": [
|
|
561
|
-
* "PR-1",
|
|
562
|
-
* "10001",
|
|
563
|
-
* "PR-3"
|
|
564
|
-
* ],
|
|
565
|
-
* "rankBeforeIssue": "PR-4",
|
|
566
|
-
* "rankCustomFieldId": 10521
|
|
567
|
-
* }
|
|
568
|
-
*/
|
|
569
|
-
requestBody: {
|
|
570
|
-
issues?: string[];
|
|
571
|
-
rankAfterIssue?: string;
|
|
572
|
-
rankBeforeIssue?: string;
|
|
573
|
-
rankCustomFieldId?: number;
|
|
574
|
-
};
|
|
575
|
-
}): Promise<void> {
|
|
576
|
-
return this.getClientInstance()
|
|
577
|
-
.request({
|
|
578
|
-
path: "/rest/agile/1.0/sprint/{sprintId}/issue",
|
|
579
|
-
method: "POST",
|
|
580
|
-
pathParams: {
|
|
581
|
-
sprintId,
|
|
582
|
-
},
|
|
583
|
-
headers: {
|
|
584
|
-
"Content-Type": "application/json",
|
|
585
|
-
},
|
|
586
|
-
body: requestBody,
|
|
587
|
-
})
|
|
588
|
-
.then(commonHttpClient.discardResult);
|
|
589
|
-
}
|
|
590
|
-
/**
|
|
591
|
-
* Performs a partial update of a sprint. A partial update means that fields not
|
|
592
|
-
* present in the request JSON will not be updated.
|
|
593
|
-
*
|
|
594
|
-
* Notes:
|
|
595
|
-
*
|
|
596
|
-
* * For closed sprints, only the name and goal can be updated; changes to other
|
|
597
|
-
* fields will be ignored.
|
|
598
|
-
* * A sprint can be started by updating the state to 'active'. This requires
|
|
599
|
-
* the sprint to be in the 'future' state and have a startDate and endDate set.
|
|
600
|
-
* * A sprint can be completed by updating the state to 'closed'. This action
|
|
601
|
-
* requires the sprint to be in the 'active' state. This sets the completeDate to
|
|
602
|
-
* the time of the request.
|
|
603
|
-
* * Other changes to state are not allowed.
|
|
604
|
-
* * The completeDate field cannot be updated manually.
|
|
605
|
-
*
|
|
606
|
-
* @returns Updated sprint
|
|
607
|
-
*
|
|
608
|
-
* example: {
|
|
609
|
-
* "id": 37,
|
|
610
|
-
* "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/23",
|
|
611
|
-
* "state": "closed",
|
|
612
|
-
* "name": "sprint 1",
|
|
613
|
-
* "startDate": "2015-04-11T15:22:00.000+10:00",
|
|
614
|
-
* "endDate": "2015-04-20T01:22:00.000+10:00",
|
|
615
|
-
* "completeDate": "2015-04-20T11:04:00.000+10:00",
|
|
616
|
-
* "originBoardId": 5,
|
|
617
|
-
* "goal": "sprint 1 goal"
|
|
618
|
-
* }
|
|
619
|
-
* @path {POST} /rest/agile/1.0/sprint/{sprintId}
|
|
620
|
-
*/
|
|
621
|
-
partiallyUpdateSprint({
|
|
622
|
-
sprintId,
|
|
623
|
-
requestBody,
|
|
624
|
-
}: {
|
|
625
|
-
/** The ID of the sprint to update. */
|
|
626
|
-
sprintId: number;
|
|
627
|
-
/**
|
|
628
|
-
* @example {
|
|
629
|
-
* "name": "new name"
|
|
630
|
-
* }
|
|
631
|
-
*/
|
|
632
|
-
requestBody: {
|
|
633
|
-
completeDate?: string;
|
|
634
|
-
createdDate?: string;
|
|
635
|
-
endDate?: string;
|
|
636
|
-
goal?: string;
|
|
637
|
-
id?: number;
|
|
638
|
-
name?: string;
|
|
639
|
-
originBoardId?: number;
|
|
640
|
-
self?: string;
|
|
641
|
-
startDate?: string;
|
|
642
|
-
state?: string;
|
|
643
|
-
};
|
|
644
|
-
}): Promise<unknown> {
|
|
645
|
-
return this.getClientInstance()
|
|
646
|
-
.request({
|
|
647
|
-
path: "/rest/agile/1.0/sprint/{sprintId}",
|
|
648
|
-
method: "POST",
|
|
649
|
-
pathParams: {
|
|
650
|
-
sprintId,
|
|
651
|
-
},
|
|
652
|
-
headers: {
|
|
653
|
-
"Content-Type": "application/json",
|
|
654
|
-
},
|
|
655
|
-
body: requestBody,
|
|
656
|
-
})
|
|
657
|
-
.then(
|
|
658
|
-
this.getClientInstance().responseHandler({
|
|
659
|
-
200: {
|
|
660
|
-
"application/json": "json",
|
|
661
|
-
},
|
|
662
|
-
}),
|
|
663
|
-
)
|
|
664
|
-
.then(
|
|
665
|
-
commonHttpClient.castResponse<{
|
|
666
|
-
status: 200;
|
|
667
|
-
mediaType: "application/json";
|
|
668
|
-
body: unknown;
|
|
669
|
-
}>(),
|
|
670
|
-
)
|
|
671
|
-
.then(
|
|
672
|
-
validationSchemaStorage.validator(
|
|
673
|
-
"SprintService.partiallyUpdateSprint.response",
|
|
674
|
-
),
|
|
675
|
-
)
|
|
676
|
-
.then(commonHttpClient.getBody);
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* Sets the value of the specified sprint's property.
|
|
680
|
-
*
|
|
681
|
-
* You can use this resource to store a custom data against the sprint identified
|
|
682
|
-
* by the id. The user who stores the data is required to have permissions to
|
|
683
|
-
* modify the sprint.
|
|
684
|
-
*
|
|
685
|
-
* @returns * status: 200, mediaType: application/json
|
|
686
|
-
*
|
|
687
|
-
* Returned if the sprint property is successfully updated.
|
|
688
|
-
*
|
|
689
|
-
* * status: 201, mediaType: application/json
|
|
690
|
-
*
|
|
691
|
-
* Returned if the sprint property is successfully created.
|
|
692
|
-
* @path {PUT} /rest/agile/1.0/sprint/{sprintId}/properties/{propertyKey}
|
|
693
|
-
*/
|
|
694
|
-
setProperty({
|
|
695
|
-
sprintId,
|
|
696
|
-
propertyKey,
|
|
697
|
-
requestBody,
|
|
698
|
-
}: {
|
|
699
|
-
/** the ID of the sprint on which the property will be set. */
|
|
700
|
-
sprintId: string;
|
|
701
|
-
/** the key of the sprint's property. The maximum length of the key is 255 bytes. */
|
|
702
|
-
propertyKey: string;
|
|
703
|
-
/**
|
|
704
|
-
* The value of the property. The value has to be a valid, non-empty
|
|
705
|
-
* [JSON](https://tools.ietf.org/html/rfc4627) value. The maximum length of the
|
|
706
|
-
* property value is 32768 bytes.
|
|
707
|
-
*/
|
|
708
|
-
requestBody: unknown;
|
|
709
|
-
}): Promise<{
|
|
710
|
-
created: boolean;
|
|
711
|
-
body: unknown;
|
|
712
|
-
}> {
|
|
713
|
-
return this.getClientInstance()
|
|
714
|
-
.request({
|
|
715
|
-
path: "/rest/agile/1.0/sprint/{sprintId}/properties/{propertyKey}",
|
|
716
|
-
method: "PUT",
|
|
717
|
-
pathParams: {
|
|
718
|
-
sprintId,
|
|
719
|
-
propertyKey,
|
|
720
|
-
},
|
|
721
|
-
headers: {
|
|
722
|
-
"Content-Type": "application/json",
|
|
723
|
-
},
|
|
724
|
-
body: requestBody,
|
|
725
|
-
})
|
|
726
|
-
.then(
|
|
727
|
-
this.getClientInstance().responseHandler({
|
|
728
|
-
200: {
|
|
729
|
-
"application/json": "json",
|
|
730
|
-
},
|
|
731
|
-
201: {
|
|
732
|
-
"application/json": "json",
|
|
733
|
-
},
|
|
734
|
-
}),
|
|
735
|
-
)
|
|
736
|
-
.then(
|
|
737
|
-
commonHttpClient.castResponse<{
|
|
738
|
-
status: 200 | 201;
|
|
739
|
-
mediaType: "application/json";
|
|
740
|
-
body: unknown;
|
|
741
|
-
}>(),
|
|
742
|
-
)
|
|
743
|
-
.then(
|
|
744
|
-
validationSchemaStorage.validator("SprintService.setProperty.response"),
|
|
745
|
-
)
|
|
746
|
-
.then(commonHttpClient.asCreatedResponse("body"));
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* Swap the position of the sprint with the second sprint.
|
|
750
|
-
*
|
|
751
|
-
* @path {POST} /rest/agile/1.0/sprint/{sprintId}/swap
|
|
752
|
-
*/
|
|
753
|
-
swapSprint({
|
|
754
|
-
sprintId,
|
|
755
|
-
requestBody,
|
|
756
|
-
}: {
|
|
757
|
-
/** The ID of the sprint to swap. */
|
|
758
|
-
sprintId: number;
|
|
759
|
-
/**
|
|
760
|
-
* @example {
|
|
761
|
-
* "sprintToSwapWith": 3
|
|
762
|
-
* }
|
|
763
|
-
*/
|
|
764
|
-
requestBody: {
|
|
765
|
-
sprintToSwapWith?: number;
|
|
766
|
-
};
|
|
767
|
-
}): Promise<void> {
|
|
768
|
-
return this.getClientInstance()
|
|
769
|
-
.request({
|
|
770
|
-
path: "/rest/agile/1.0/sprint/{sprintId}/swap",
|
|
771
|
-
method: "POST",
|
|
772
|
-
pathParams: {
|
|
773
|
-
sprintId,
|
|
774
|
-
},
|
|
775
|
-
headers: {
|
|
776
|
-
"Content-Type": "application/json",
|
|
777
|
-
},
|
|
778
|
-
body: requestBody,
|
|
779
|
-
})
|
|
780
|
-
.then(commonHttpClient.discardResult);
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Performs a full update of a sprint. A full update means that the result will be
|
|
784
|
-
* exactly the same as the request body. Any fields not present in the request
|
|
785
|
-
* JSON will be set to null.
|
|
786
|
-
*
|
|
787
|
-
* Notes:
|
|
788
|
-
*
|
|
789
|
-
* * For closed sprints, only the name and goal can be updated; changes to other
|
|
790
|
-
* fields will be ignored.
|
|
791
|
-
* * A sprint can be started by updating the state to 'active'. This requires
|
|
792
|
-
* the sprint to be in the 'future' state and have a startDate and endDate set.
|
|
793
|
-
* * A sprint can be completed by updating the state to 'closed'. This action
|
|
794
|
-
* requires the sprint to be in the 'active' state. This sets the completeDate to
|
|
795
|
-
* the time of the request.
|
|
796
|
-
* * Other changes to state are not allowed.
|
|
797
|
-
* * The completeDate field cannot be updated manually.
|
|
798
|
-
*
|
|
799
|
-
* @returns Updated sprint
|
|
800
|
-
*
|
|
801
|
-
* example: {
|
|
802
|
-
* "id": 37,
|
|
803
|
-
* "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/23",
|
|
804
|
-
* "state": "closed",
|
|
805
|
-
* "name": "sprint 1",
|
|
806
|
-
* "startDate": "2015-04-11T15:22:00.000+10:00",
|
|
807
|
-
* "endDate": "2015-04-20T01:22:00.000+10:00",
|
|
808
|
-
* "completeDate": "2015-04-20T11:04:00.000+10:00",
|
|
809
|
-
* "originBoardId": 5,
|
|
810
|
-
* "goal": "sprint 1 goal"
|
|
811
|
-
* }
|
|
812
|
-
* @path {PUT} /rest/agile/1.0/sprint/{sprintId}
|
|
813
|
-
*/
|
|
814
|
-
updateSprint({
|
|
815
|
-
sprintId,
|
|
816
|
-
requestBody,
|
|
817
|
-
}: {
|
|
818
|
-
/** the ID of the sprint to update. */
|
|
819
|
-
sprintId: number;
|
|
820
|
-
/**
|
|
821
|
-
* @example {
|
|
822
|
-
* "completeDate": "2015-04-20T11:11:28.008+10:00",
|
|
823
|
-
* "endDate": "2015-04-16T14:01:00.000+10:00",
|
|
824
|
-
* "goal": "sprint 1 goal",
|
|
825
|
-
* "name": "sprint 1",
|
|
826
|
-
* "startDate": "2015-04-11T15:36:00.000+10:00",
|
|
827
|
-
* "state": "closed"
|
|
828
|
-
* }
|
|
829
|
-
*/
|
|
830
|
-
requestBody: {
|
|
831
|
-
completeDate?: string;
|
|
832
|
-
createdDate?: string;
|
|
833
|
-
endDate?: string;
|
|
834
|
-
goal?: string;
|
|
835
|
-
id?: number;
|
|
836
|
-
name?: string;
|
|
837
|
-
originBoardId?: number;
|
|
838
|
-
self?: string;
|
|
839
|
-
startDate?: string;
|
|
840
|
-
state?: string;
|
|
841
|
-
};
|
|
842
|
-
}): Promise<unknown> {
|
|
843
|
-
return this.getClientInstance()
|
|
844
|
-
.request({
|
|
845
|
-
path: "/rest/agile/1.0/sprint/{sprintId}",
|
|
846
|
-
method: "PUT",
|
|
847
|
-
pathParams: {
|
|
848
|
-
sprintId,
|
|
849
|
-
},
|
|
850
|
-
headers: {
|
|
851
|
-
"Content-Type": "application/json",
|
|
852
|
-
},
|
|
853
|
-
body: requestBody,
|
|
854
|
-
})
|
|
855
|
-
.then(
|
|
856
|
-
this.getClientInstance().responseHandler({
|
|
857
|
-
200: {
|
|
858
|
-
"application/json": "json",
|
|
859
|
-
},
|
|
860
|
-
}),
|
|
861
|
-
)
|
|
862
|
-
.then(
|
|
863
|
-
commonHttpClient.castResponse<{
|
|
864
|
-
status: 200;
|
|
865
|
-
mediaType: "application/json";
|
|
866
|
-
body: unknown;
|
|
867
|
-
}>(),
|
|
868
|
-
)
|
|
869
|
-
.then(
|
|
870
|
-
validationSchemaStorage.validator(
|
|
871
|
-
"SprintService.updateSprint.response",
|
|
872
|
-
),
|
|
873
|
-
)
|
|
874
|
-
.then(commonHttpClient.getBody);
|
|
875
|
-
}
|
|
876
|
-
static initialize() {
|
|
877
|
-
validationSchemaStorage.registerExtensible(
|
|
878
|
-
"SprintService.createSprint.response",
|
|
879
|
-
z
|
|
880
|
-
.object({
|
|
881
|
-
status: z.literal(201),
|
|
882
|
-
mediaType: z.literal("application/json"),
|
|
883
|
-
body: z.unknown(),
|
|
884
|
-
})
|
|
885
|
-
.describe("SprintService.createSprint.response"),
|
|
886
|
-
);
|
|
887
|
-
validationSchemaStorage.registerExtensible(
|
|
888
|
-
"SprintService.getSprint.response",
|
|
889
|
-
z
|
|
890
|
-
.object({
|
|
891
|
-
status: z.literal(200),
|
|
892
|
-
mediaType: z.literal("application/json"),
|
|
893
|
-
body: z.unknown(),
|
|
894
|
-
})
|
|
895
|
-
.describe("SprintService.getSprint.response"),
|
|
896
|
-
);
|
|
897
|
-
validationSchemaStorage.registerExtensible(
|
|
898
|
-
"SprintService.updateSprint.response",
|
|
899
|
-
z
|
|
900
|
-
.object({
|
|
901
|
-
status: z.literal(200),
|
|
902
|
-
mediaType: z.literal("application/json"),
|
|
903
|
-
body: z.unknown(),
|
|
904
|
-
})
|
|
905
|
-
.describe("SprintService.updateSprint.response"),
|
|
906
|
-
);
|
|
907
|
-
validationSchemaStorage.registerExtensible(
|
|
908
|
-
"SprintService.partiallyUpdateSprint.response",
|
|
909
|
-
z
|
|
910
|
-
.object({
|
|
911
|
-
status: z.literal(200),
|
|
912
|
-
mediaType: z.literal("application/json"),
|
|
913
|
-
body: z.unknown(),
|
|
914
|
-
})
|
|
915
|
-
.describe("SprintService.partiallyUpdateSprint.response"),
|
|
916
|
-
);
|
|
917
|
-
validationSchemaStorage.registerExtensible(
|
|
918
|
-
"SprintService.getIssuesForSprint.response",
|
|
919
|
-
z
|
|
920
|
-
.object({
|
|
921
|
-
status: z.literal(200),
|
|
922
|
-
mediaType: z.literal("application/json"),
|
|
923
|
-
body: z.unknown(),
|
|
924
|
-
})
|
|
925
|
-
.describe("SprintService.getIssuesForSprint.response"),
|
|
926
|
-
);
|
|
927
|
-
validationSchemaStorage.registerExtensible(
|
|
928
|
-
"SprintService.getPropertiesKeys.response",
|
|
929
|
-
z
|
|
930
|
-
.object({
|
|
931
|
-
status: z.literal(200),
|
|
932
|
-
mediaType: z.literal("application/json"),
|
|
933
|
-
body: z.unknown(),
|
|
934
|
-
})
|
|
935
|
-
.describe("SprintService.getPropertiesKeys.response"),
|
|
936
|
-
);
|
|
937
|
-
validationSchemaStorage.registerExtensible(
|
|
938
|
-
"SprintService.getProperty.response",
|
|
939
|
-
z
|
|
940
|
-
.object({
|
|
941
|
-
status: z.literal(200),
|
|
942
|
-
mediaType: z.literal("application/json"),
|
|
943
|
-
body: z.unknown(),
|
|
944
|
-
})
|
|
945
|
-
.describe("SprintService.getProperty.response"),
|
|
946
|
-
);
|
|
947
|
-
validationSchemaStorage.registerExtensible(
|
|
948
|
-
"SprintService.setProperty.response",
|
|
949
|
-
z
|
|
950
|
-
.object({
|
|
951
|
-
status: z.number(),
|
|
952
|
-
mediaType: z.string(),
|
|
953
|
-
body: z.unknown(),
|
|
954
|
-
})
|
|
955
|
-
.superRefine(({ status: status, body: body }, ctx) => {
|
|
956
|
-
if (status === 200 || status === 201) {
|
|
957
|
-
z.unknown().parse(body);
|
|
958
|
-
} else {
|
|
959
|
-
ctx.addIssue({
|
|
960
|
-
code: z.ZodIssueCode.custom,
|
|
961
|
-
path: ["status"],
|
|
962
|
-
message: `Unexpected status code: ${status}`,
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
})
|
|
966
|
-
.describe("SprintService.setProperty.response"),
|
|
967
|
-
);
|
|
968
|
-
}
|
|
969
|
-
}
|