@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.
Files changed (201) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +10 -3
  3. package/.eslintrc.js +0 -3
  4. package/config/api-typescript-generator.config.ts +0 -91
  5. package/config/compare-schemas.ts +0 -307
  6. package/src/index.ts +0 -47
  7. package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
  8. package/src/openapi/platform/core/common-http-client.ts +0 -723
  9. package/src/openapi/platform/core/common-http-service.ts +0 -22
  10. package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
  11. package/src/openapi/platform/models/announcement-banner.ts +0 -59
  12. package/src/openapi/platform/models/app-data-policies.ts +0 -79
  13. package/src/openapi/platform/models/app-migration.ts +0 -172
  14. package/src/openapi/platform/models/app-properties.ts +0 -32
  15. package/src/openapi/platform/models/audit-records.ts +0 -140
  16. package/src/openapi/platform/models/avatars.ts +0 -48
  17. package/src/openapi/platform/models/classification-levels.ts +0 -58
  18. package/src/openapi/platform/models/common.ts +0 -2669
  19. package/src/openapi/platform/models/dashboards.ts +0 -849
  20. package/src/openapi/platform/models/dynamic-modules.ts +0 -121
  21. package/src/openapi/platform/models/filter-sharing.ts +0 -103
  22. package/src/openapi/platform/models/filters.ts +0 -319
  23. package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
  24. package/src/openapi/platform/models/groups.ts +0 -247
  25. package/src/openapi/platform/models/issue-attachments.ts +0 -290
  26. package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
  27. package/src/openapi/platform/models/issue-comments.ts +0 -91
  28. package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
  29. package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
  30. package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
  31. package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
  32. package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
  33. package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
  34. package/src/openapi/platform/models/issue-fields.ts +0 -392
  35. package/src/openapi/platform/models/issue-link-types.ts +0 -28
  36. package/src/openapi/platform/models/issue-links.ts +0 -185
  37. package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
  38. package/src/openapi/platform/models/issue-priorities.ts +0 -196
  39. package/src/openapi/platform/models/issue-properties.ts +0 -259
  40. package/src/openapi/platform/models/issue-remote-links.ts +0 -207
  41. package/src/openapi/platform/models/issue-resolutions.ts +0 -180
  42. package/src/openapi/platform/models/issue-search.ts +0 -367
  43. package/src/openapi/platform/models/issue-security-level.ts +0 -76
  44. package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
  45. package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
  46. package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
  47. package/src/openapi/platform/models/issue-types.ts +0 -66
  48. package/src/openapi/platform/models/issue-votes.ts +0 -38
  49. package/src/openapi/platform/models/issue-watchers.ts +0 -67
  50. package/src/openapi/platform/models/issue-worklogs.ts +0 -190
  51. package/src/openapi/platform/models/issues.ts +0 -1268
  52. package/src/openapi/platform/models/jira-expressions.ts +0 -578
  53. package/src/openapi/platform/models/jira-settings.ts +0 -118
  54. package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
  55. package/src/openapi/platform/models/jql.ts +0 -783
  56. package/src/openapi/platform/models/labels.ts +0 -42
  57. package/src/openapi/platform/models/license-metrics.ts +0 -68
  58. package/src/openapi/platform/models/myself.ts +0 -29
  59. package/src/openapi/platform/models/permission-schemes.ts +0 -89
  60. package/src/openapi/platform/models/permissions.ts +0 -308
  61. package/src/openapi/platform/models/priority-schemes.ts +0 -527
  62. package/src/openapi/platform/models/project-avatars.ts +0 -29
  63. package/src/openapi/platform/models/project-classification-levels.ts +0 -24
  64. package/src/openapi/platform/models/project-components.ts +0 -231
  65. package/src/openapi/platform/models/project-email.ts +0 -27
  66. package/src/openapi/platform/models/project-features.ts +0 -78
  67. package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
  68. package/src/openapi/platform/models/project-role-actors.ts +0 -107
  69. package/src/openapi/platform/models/project-roles.ts +0 -76
  70. package/src/openapi/platform/models/project-types.ts +0 -36
  71. package/src/openapi/platform/models/project-versions.ts +0 -216
  72. package/src/openapi/platform/models/projects.ts +0 -429
  73. package/src/openapi/platform/models/screen-schemes.ts +0 -192
  74. package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
  75. package/src/openapi/platform/models/screens.ts +0 -171
  76. package/src/openapi/platform/models/server-info.ts +0 -100
  77. package/src/openapi/platform/models/service-registry.ts +0 -68
  78. package/src/openapi/platform/models/status.ts +0 -229
  79. package/src/openapi/platform/models/time-tracking.ts +0 -38
  80. package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
  81. package/src/openapi/platform/models/user-search.ts +0 -69
  82. package/src/openapi/platform/models/users.ts +0 -121
  83. package/src/openapi/platform/models/webhooks.ts +0 -307
  84. package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
  85. package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
  86. package/src/openapi/platform/models/workflow-schemes.ts +0 -545
  87. package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
  88. package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
  89. package/src/openapi/platform/models/workflows.ts +0 -1943
  90. package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
  91. package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
  92. package/src/openapi/platform/services/app-migration-service.ts +0 -289
  93. package/src/openapi/platform/services/app-properties-service.ts +0 -441
  94. package/src/openapi/platform/services/application-roles-service.ts +0 -247
  95. package/src/openapi/platform/services/audit-records-service.ts +0 -164
  96. package/src/openapi/platform/services/avatars-service.ts +0 -769
  97. package/src/openapi/platform/services/classification-levels-service.ts +0 -131
  98. package/src/openapi/platform/services/dashboards-service.ts +0 -1721
  99. package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
  100. package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
  101. package/src/openapi/platform/services/filters-service.ts +0 -1901
  102. package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
  103. package/src/openapi/platform/services/groups-service.ts +0 -751
  104. package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
  105. package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
  106. package/src/openapi/platform/services/issue-comments-service.ts +0 -812
  107. package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
  108. package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
  109. package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
  110. package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
  111. package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
  112. package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
  113. package/src/openapi/platform/services/issue-fields-service.ts +0 -837
  114. package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
  115. package/src/openapi/platform/services/issue-links-service.ts +0 -345
  116. package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
  117. package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
  118. package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
  119. package/src/openapi/platform/services/issue-properties-service.ts +0 -606
  120. package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
  121. package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
  122. package/src/openapi/platform/services/issue-search-service.ts +0 -1139
  123. package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
  124. package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
  125. package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
  126. package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
  127. package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
  128. package/src/openapi/platform/services/issue-types-service.ts +0 -679
  129. package/src/openapi/platform/services/issue-votes-service.ts +0 -221
  130. package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
  131. package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
  132. package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
  133. package/src/openapi/platform/services/issues-service.ts +0 -3346
  134. package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
  135. package/src/openapi/platform/services/jira-settings-service.ts +0 -415
  136. package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
  137. package/src/openapi/platform/services/jql-service.ts +0 -896
  138. package/src/openapi/platform/services/labels-service.ts +0 -89
  139. package/src/openapi/platform/services/license-metrics-service.ts +0 -216
  140. package/src/openapi/platform/services/myself-service.ts +0 -520
  141. package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
  142. package/src/openapi/platform/services/permissions-service.ts +0 -407
  143. package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
  144. package/src/openapi/platform/services/project-avatars-service.ts +0 -341
  145. package/src/openapi/platform/services/project-categories-service.ts +0 -318
  146. package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
  147. package/src/openapi/platform/services/project-components-service.ts +0 -1332
  148. package/src/openapi/platform/services/project-email-service.ts +0 -161
  149. package/src/openapi/platform/services/project-features-service.ts +0 -207
  150. package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
  151. package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
  152. package/src/openapi/platform/services/project-properties-service.ts +0 -320
  153. package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
  154. package/src/openapi/platform/services/project-roles-service.ts +0 -867
  155. package/src/openapi/platform/services/project-types-service.ts +0 -297
  156. package/src/openapi/platform/services/project-versions-service.ts +0 -1287
  157. package/src/openapi/platform/services/projects-service.ts +0 -2196
  158. package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
  159. package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
  160. package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
  161. package/src/openapi/platform/services/screens-service.ts +0 -528
  162. package/src/openapi/platform/services/server-info-service.ts +0 -88
  163. package/src/openapi/platform/services/service-registry-service.ts +0 -89
  164. package/src/openapi/platform/services/status-service.ts +0 -498
  165. package/src/openapi/platform/services/tasks-service.ts +0 -159
  166. package/src/openapi/platform/services/time-tracking-service.ts +0 -386
  167. package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
  168. package/src/openapi/platform/services/user-properties-service.ts +0 -413
  169. package/src/openapi/platform/services/user-search-service.ts +0 -1214
  170. package/src/openapi/platform/services/users-service.ts +0 -1108
  171. package/src/openapi/platform/services/webhooks-service.ts +0 -458
  172. package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
  173. package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
  174. package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
  175. package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
  176. package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
  177. package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
  178. package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
  179. package/src/openapi/platform/services/workflows-service.ts +0 -3477
  180. package/src/openapi/platform/validation-schema-storage.ts +0 -186
  181. package/src/openapi/software/base-jira-software-api-client.ts +0 -447
  182. package/src/openapi/software/core/common-http-client.ts +0 -723
  183. package/src/openapi/software/core/common-http-service.ts +0 -22
  184. package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
  185. package/src/openapi/software/models/board.ts +0 -918
  186. package/src/openapi/software/services/backlog-service.ts +0 -160
  187. package/src/openapi/software/services/board-service.ts +0 -4189
  188. package/src/openapi/software/services/builds-service.ts +0 -571
  189. package/src/openapi/software/services/deployments-service.ts +0 -403
  190. package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
  191. package/src/openapi/software/services/development-information-service.ts +0 -2357
  192. package/src/openapi/software/services/epic-service.ts +0 -854
  193. package/src/openapi/software/services/feature-flags-service.ts +0 -303
  194. package/src/openapi/software/services/issue-service.ts +0 -529
  195. package/src/openapi/software/services/operations-service.ts +0 -741
  196. package/src/openapi/software/services/remote-links-service.ts +0 -653
  197. package/src/openapi/software/services/security-information-service.ts +0 -495
  198. package/src/openapi/software/services/sprint-service.ts +0 -969
  199. package/src/openapi/software/validation-schema-storage.ts +0 -186
  200. package/tsconfig.build.json +0 -7
  201. package/tsconfig.json +0 -4
@@ -1,854 +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 epics */
10
- export class EpicService extends CommonHttpService {
11
- /**
12
- * Returns the epic for a given epic ID. This epic will only be returned if the
13
- * user has permission to view it. **Note:** This operation does not work for
14
- * epics in next-gen projects.
15
- *
16
- * @returns Returns the requested epic.
17
- *
18
- * example: {
19
- * "id": 37,
20
- * "self": "https://your-domain.atlassian.net/rest/agile/1.0/epic/23",
21
- * "name": "epic 1",
22
- * "summary": "epic 1 summary",
23
- * "color": {
24
- * "key": "color_4"
25
- * },
26
- * "done": true
27
- * }
28
- * @path {GET} /rest/agile/1.0/epic/{epicIdOrKey}
29
- */
30
- getEpic({
31
- epicIdOrKey,
32
- }: {
33
- /** The id or key of the requested epic. */
34
- epicIdOrKey: string;
35
- }): Promise<unknown> {
36
- return this.getClientInstance()
37
- .request({
38
- path: "/rest/agile/1.0/epic/{epicIdOrKey}",
39
- method: "GET",
40
- pathParams: {
41
- epicIdOrKey,
42
- },
43
- })
44
- .then(
45
- this.getClientInstance().responseHandler({
46
- 200: {
47
- "application/json": "json",
48
- },
49
- }),
50
- )
51
- .then(
52
- commonHttpClient.castResponse<{
53
- status: 200;
54
- mediaType: "application/json";
55
- body: unknown;
56
- }>(),
57
- )
58
- .then(validationSchemaStorage.validator("EpicService.getEpic.response"))
59
- .then(commonHttpClient.getBody);
60
- }
61
- /**
62
- * Returns all issues that belong to the epic, for the given epic ID. This only
63
- * includes issues that the user has permission to view. Issues returned from this
64
- * resource include Agile fields, like sprint, closedSprints, flagged, and epic.
65
- * By default, the returned issues are ordered by rank. **Note:** If you are
66
- * querying a next-gen project, do not use this operation. Instead, search for
67
- * issues that belong to an epic by using the [Search for issues using
68
- * JQL](https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-search-get)
69
- * operation in the Jira platform REST API. Build your JQL query using the
70
- * `parent` clause. For more information on the `parent` JQL field, see [Advanced
71
- * searching](https://confluence.atlassian.com/x/dAiiLQ#Advancedsearching-fieldsreference-Parent).
72
- *
73
- * @returns Returns the requested issues, at the specified page of the results.
74
- *
75
- * example: {
76
- * "expand": "names,schema",
77
- * "issues": [
78
- * {
79
- * "expand": "",
80
- * "fields": {
81
- * "flagged": true,
82
- * "sprint": {
83
- * "id": 37,
84
- * "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/13",
85
- * "state": "future",
86
- * "name": "sprint 2",
87
- * "goal": "sprint 2 goal"
88
- * },
89
- * "closedSprints": [
90
- * {
91
- * "id": 37,
92
- * "self":
93
- * "https://your-domain.atlassian.net/rest/agile/1.0/sprint/23",
94
- * "state": "closed",
95
- * "name": "sprint 1",
96
- * "startDate": "2015-04-11T15:22:00.000+10:00",
97
- * "endDate": "2015-04-20T01:22:00.000+10:00",
98
- * "completeDate": "2015-04-20T11:04:00.000+10:00",
99
- * "goal": "sprint 1 goal"
100
- * }
101
- * ],
102
- * "description": "example bug report",
103
- * "project": {
104
- * "avatarUrls": {
105
- * "16x16":
106
- * "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
107
- * "24x24":
108
- * "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
109
- * "32x32":
110
- * "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
111
- * "48x48":
112
- * "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
113
- * },
114
- * "id": "10000",
115
- * "insight": {
116
- * "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
117
- * "totalIssueCount": 100
118
- * },
119
- * "key": "EX",
120
- * "name": "Example",
121
- * "projectCategory": {
122
- * "description": "First Project Category",
123
- * "id": "10000",
124
- * "name": "FIRST",
125
- * "self":
126
- * "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
127
- * },
128
- * "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
129
- * "simplified": false,
130
- * "style": "classic"
131
- * },
132
- * "comment": [
133
- * {
134
- * "author": {
135
- * "accountId": "5b10a2844c20165700ede21g",
136
- * "active": false,
137
- * "displayName": "Mia Krystof",
138
- * "self":
139
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
140
- * },
141
- * "body": {
142
- * "type": "doc",
143
- * "version": 1,
144
- * "content": [
145
- * {
146
- * "type": "paragraph",
147
- * "content": [
148
- * {
149
- * "type": "text",
150
- * "text": "Lorem ipsum dolor sit amet, consectetur
151
- * adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue
152
- * iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue
153
- * semper."
154
- * }
155
- * ]
156
- * }
157
- * ]
158
- * },
159
- * "created": "2021-01-17T12:34:00.000+0000",
160
- * "id": "10000",
161
- * "self":
162
- * "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
163
- * "updateAuthor": {
164
- * "accountId": "5b10a2844c20165700ede21g",
165
- * "active": false,
166
- * "displayName": "Mia Krystof",
167
- * "self":
168
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
169
- * },
170
- * "updated": "2021-01-18T23:45:00.000+0000",
171
- * "visibility": {
172
- * "identifier": "Administrators",
173
- * "type": "role",
174
- * "value": "Administrators"
175
- * }
176
- * }
177
- * ],
178
- * "epic": {
179
- * "id": 37,
180
- * "self": "https://your-domain.atlassian.net/rest/agile/1.0/epic/23",
181
- * "name": "epic 1",
182
- * "summary": "epic 1 summary",
183
- * "color": {
184
- * "key": "color_4"
185
- * },
186
- * "done": true
187
- * },
188
- * "worklog": [
189
- * {
190
- * "author": {
191
- * "accountId": "5b10a2844c20165700ede21g",
192
- * "active": false,
193
- * "displayName": "Mia Krystof",
194
- * "self":
195
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
196
- * },
197
- * "comment": {
198
- * "type": "doc",
199
- * "version": 1,
200
- * "content": [
201
- * {
202
- * "type": "paragraph",
203
- * "content": [
204
- * {
205
- * "type": "text",
206
- * "text": "I did some work here."
207
- * }
208
- * ]
209
- * }
210
- * ]
211
- * },
212
- * "id": "100028",
213
- * "issueId": "10002",
214
- * "self":
215
- * "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
216
- * "started": "2021-01-17T12:34:00.000+0000",
217
- * "timeSpent": "3h 20m",
218
- * "timeSpentSeconds": 12000,
219
- * "updateAuthor": {
220
- * "accountId": "5b10a2844c20165700ede21g",
221
- * "active": false,
222
- * "displayName": "Mia Krystof",
223
- * "self":
224
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
225
- * },
226
- * "updated": "2021-01-18T23:45:00.000+0000",
227
- * "visibility": {
228
- * "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
229
- * "type": "group",
230
- * "value": "jira-developers"
231
- * }
232
- * }
233
- * ],
234
- * "updated": 1,
235
- * "timetracking": {
236
- * "originalEstimate": "10m",
237
- * "originalEstimateSeconds": 600,
238
- * "remainingEstimate": "3m",
239
- * "remainingEstimateSeconds": 200,
240
- * "timeSpent": "6m",
241
- * "timeSpentSeconds": 400
242
- * }
243
- * },
244
- * "id": "10001",
245
- * "key": "HSP-1",
246
- * "self":
247
- * "https://your-domain.atlassian.net/rest/agile/1.0/board/92/issue/10001"
248
- * }
249
- * ],
250
- * "maxResults": 50,
251
- * "startAt": 0,
252
- * "total": 1
253
- * }
254
- * @path {GET} /rest/agile/1.0/epic/{epicIdOrKey}/issue
255
- */
256
- getIssuesForEpic({
257
- epicIdOrKey,
258
- startAt,
259
- maxResults,
260
- jql,
261
- validateQuery,
262
- fields,
263
- expand,
264
- }: {
265
- /** The id or key of the epic that contains the requested issues. */
266
- epicIdOrKey: string;
267
- /**
268
- * The starting index of the returned issues. Base index: 0. See the 'Pagination'
269
- * section at the top of this page for more details.
270
- */
271
- startAt?: number;
272
- /**
273
- * The maximum number of issues to return per page. Default: 50. See the
274
- * 'Pagination' section at the top of this page for more details. Note, the total
275
- * number of issues returned is limited by the property
276
- * 'jira.search.views.default.max' in your Jira instance. If you exceed this
277
- * limit, your results will be truncated.
278
- */
279
- maxResults?: number;
280
- /**
281
- * Filters results using a JQL query. If you define an order in your JQL query, it
282
- * will override the default order of the returned issues.
283
- * Note that `username` and `userkey` can't be used as search terms for this
284
- * parameter due to privacy reasons. Use `accountId` instead.
285
- */
286
- jql?: string;
287
- /** Specifies whether to validate the JQL query or not. Default: true. */
288
- validateQuery?: boolean;
289
- /**
290
- * The list of fields to return for each issue. By default, all navigable and
291
- * Agile fields are returned.
292
- */
293
- fields?: {}[];
294
- /** A comma-separated list of the parameters to expand. */
295
- expand?: string;
296
- }): Promise<unknown> {
297
- return this.getClientInstance()
298
- .request({
299
- path: "/rest/agile/1.0/epic/{epicIdOrKey}/issue",
300
- method: "GET",
301
- pathParams: {
302
- epicIdOrKey,
303
- },
304
- query: {
305
- startAt,
306
- maxResults,
307
- jql,
308
- validateQuery,
309
- fields,
310
- expand,
311
- },
312
- })
313
- .then(
314
- this.getClientInstance().responseHandler({
315
- 200: {
316
- "application/json": "json",
317
- },
318
- }),
319
- )
320
- .then(
321
- commonHttpClient.castResponse<{
322
- status: 200;
323
- mediaType: "application/json";
324
- body: unknown;
325
- }>(),
326
- )
327
- .then(
328
- validationSchemaStorage.validator(
329
- "EpicService.getIssuesForEpic.response",
330
- ),
331
- )
332
- .then(commonHttpClient.getBody);
333
- }
334
- /**
335
- * Returns all issues that do not belong to any epic. This only includes issues
336
- * that the user has permission to view. Issues returned from this resource
337
- * include Agile fields, like sprint, closedSprints, flagged, and epic. By
338
- * default, the returned issues are ordered by rank. **Note:** If you are querying
339
- * a next-gen project, do not use this operation. Instead, search for issues that
340
- * don't belong to an epic by using the [Search for issues using
341
- * JQL](https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-search-get)
342
- * operation in the Jira platform REST API. Build your JQL query using the `parent
343
- * is empty` clause. For more information on the `parent` JQL field, see [Advanced
344
- * searching](https://confluence.atlassian.com/x/dAiiLQ#Advancedsearching-fieldsreference-Parent).
345
- *
346
- * @returns Returns the requested issues, at the specified page of the results.
347
- *
348
- * example: {
349
- * "expand": "names,schema",
350
- * "issues": [
351
- * {
352
- * "expand": "",
353
- * "fields": {
354
- * "flagged": true,
355
- * "sprint": {
356
- * "id": 37,
357
- * "self": "https://your-domain.atlassian.net/rest/agile/1.0/sprint/13",
358
- * "state": "future",
359
- * "name": "sprint 2",
360
- * "goal": "sprint 2 goal"
361
- * },
362
- * "closedSprints": [
363
- * {
364
- * "id": 37,
365
- * "self":
366
- * "https://your-domain.atlassian.net/rest/agile/1.0/sprint/23",
367
- * "state": "closed",
368
- * "name": "sprint 1",
369
- * "startDate": "2015-04-11T15:22:00.000+10:00",
370
- * "endDate": "2015-04-20T01:22:00.000+10:00",
371
- * "completeDate": "2015-04-20T11:04:00.000+10:00",
372
- * "goal": "sprint 1 goal"
373
- * }
374
- * ],
375
- * "description": "example bug report",
376
- * "project": {
377
- * "avatarUrls": {
378
- * "16x16":
379
- * "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
380
- * "24x24":
381
- * "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
382
- * "32x32":
383
- * "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
384
- * "48x48":
385
- * "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
386
- * },
387
- * "id": "10000",
388
- * "insight": {
389
- * "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
390
- * "totalIssueCount": 100
391
- * },
392
- * "key": "EX",
393
- * "name": "Example",
394
- * "projectCategory": {
395
- * "description": "First Project Category",
396
- * "id": "10000",
397
- * "name": "FIRST",
398
- * "self":
399
- * "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
400
- * },
401
- * "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
402
- * "simplified": false,
403
- * "style": "classic"
404
- * },
405
- * "comment": [
406
- * {
407
- * "author": {
408
- * "accountId": "5b10a2844c20165700ede21g",
409
- * "active": false,
410
- * "displayName": "Mia Krystof",
411
- * "self":
412
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
413
- * },
414
- * "body": {
415
- * "type": "doc",
416
- * "version": 1,
417
- * "content": [
418
- * {
419
- * "type": "paragraph",
420
- * "content": [
421
- * {
422
- * "type": "text",
423
- * "text": "Lorem ipsum dolor sit amet, consectetur
424
- * adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue
425
- * iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue
426
- * semper."
427
- * }
428
- * ]
429
- * }
430
- * ]
431
- * },
432
- * "created": "2021-01-17T12:34:00.000+0000",
433
- * "id": "10000",
434
- * "self":
435
- * "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
436
- * "updateAuthor": {
437
- * "accountId": "5b10a2844c20165700ede21g",
438
- * "active": false,
439
- * "displayName": "Mia Krystof",
440
- * "self":
441
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
442
- * },
443
- * "updated": "2021-01-18T23:45:00.000+0000",
444
- * "visibility": {
445
- * "identifier": "Administrators",
446
- * "type": "role",
447
- * "value": "Administrators"
448
- * }
449
- * }
450
- * ],
451
- * "epic": {
452
- * "id": 37,
453
- * "self": "https://your-domain.atlassian.net/rest/agile/1.0/epic/23",
454
- * "name": "epic 1",
455
- * "summary": "epic 1 summary",
456
- * "color": {
457
- * "key": "color_4"
458
- * },
459
- * "done": true
460
- * },
461
- * "worklog": [
462
- * {
463
- * "author": {
464
- * "accountId": "5b10a2844c20165700ede21g",
465
- * "active": false,
466
- * "displayName": "Mia Krystof",
467
- * "self":
468
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
469
- * },
470
- * "comment": {
471
- * "type": "doc",
472
- * "version": 1,
473
- * "content": [
474
- * {
475
- * "type": "paragraph",
476
- * "content": [
477
- * {
478
- * "type": "text",
479
- * "text": "I did some work here."
480
- * }
481
- * ]
482
- * }
483
- * ]
484
- * },
485
- * "id": "100028",
486
- * "issueId": "10002",
487
- * "self":
488
- * "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
489
- * "started": "2021-01-17T12:34:00.000+0000",
490
- * "timeSpent": "3h 20m",
491
- * "timeSpentSeconds": 12000,
492
- * "updateAuthor": {
493
- * "accountId": "5b10a2844c20165700ede21g",
494
- * "active": false,
495
- * "displayName": "Mia Krystof",
496
- * "self":
497
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
498
- * },
499
- * "updated": "2021-01-18T23:45:00.000+0000",
500
- * "visibility": {
501
- * "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
502
- * "type": "group",
503
- * "value": "jira-developers"
504
- * }
505
- * }
506
- * ],
507
- * "updated": 1,
508
- * "timetracking": {
509
- * "originalEstimate": "10m",
510
- * "originalEstimateSeconds": 600,
511
- * "remainingEstimate": "3m",
512
- * "remainingEstimateSeconds": 200,
513
- * "timeSpent": "6m",
514
- * "timeSpentSeconds": 400
515
- * }
516
- * },
517
- * "id": "10001",
518
- * "key": "HSP-1",
519
- * "self":
520
- * "https://your-domain.atlassian.net/rest/agile/1.0/board/92/issue/10001"
521
- * }
522
- * ],
523
- * "maxResults": 50,
524
- * "startAt": 0,
525
- * "total": 1
526
- * }
527
- * @path {GET} /rest/agile/1.0/epic/none/issue
528
- */
529
- getIssuesWithoutEpic({
530
- startAt,
531
- maxResults,
532
- jql,
533
- validateQuery,
534
- fields,
535
- expand,
536
- }: {
537
- /**
538
- * The starting index of the returned issues. Base index: 0. See the 'Pagination'
539
- * section at the top of this page for more details.
540
- */
541
- startAt?: number;
542
- /**
543
- * The maximum number of issues to return per page. See the 'Pagination' section
544
- * at the top of this page for more details. Note, the total number of issues
545
- * returned is limited by the property 'jira.search.views.default.max' in your
546
- * Jira instance. If you exceed this limit, your results will be truncated.
547
- */
548
- maxResults?: number;
549
- /**
550
- * Filters results using a JQL query. If you define an order in your JQL query, it
551
- * will override the default order of the returned issues.
552
- */
553
- jql?: string;
554
- /** Specifies whether to validate the JQL query or not. Default: true. */
555
- validateQuery?: boolean;
556
- /**
557
- * The list of fields to return for each issue. By default, all navigable and
558
- * Agile fields are returned.
559
- */
560
- fields?: {}[];
561
- /** A comma-separated list of the parameters to expand. */
562
- expand?: string;
563
- }): Promise<unknown> {
564
- return this.getClientInstance()
565
- .request({
566
- path: "/rest/agile/1.0/epic/none/issue",
567
- method: "GET",
568
- query: {
569
- startAt,
570
- maxResults,
571
- jql,
572
- validateQuery,
573
- fields,
574
- expand,
575
- },
576
- })
577
- .then(
578
- this.getClientInstance().responseHandler({
579
- 200: {
580
- "application/json": "json",
581
- },
582
- }),
583
- )
584
- .then(
585
- commonHttpClient.castResponse<{
586
- status: 200;
587
- mediaType: "application/json";
588
- body: unknown;
589
- }>(),
590
- )
591
- .then(
592
- validationSchemaStorage.validator(
593
- "EpicService.getIssuesWithoutEpic.response",
594
- ),
595
- )
596
- .then(commonHttpClient.getBody);
597
- }
598
- /**
599
- * Moves issues to an epic, for a given epic id. Issues can be only in a single
600
- * epic at the same time. That means that already assigned issues to an epic, will
601
- * not be assigned to the previous epic anymore. The user needs to have the edit
602
- * issue permission for all issue they want to move and to the epic. The maximum
603
- * number of issues that can be moved in one operation is 50. **Note:** This
604
- * operation does not work for epics in next-gen projects.
605
- *
606
- * @path {POST} /rest/agile/1.0/epic/{epicIdOrKey}/issue
607
- */
608
- moveIssuesToEpic({
609
- epicIdOrKey,
610
- requestBody,
611
- }: {
612
- /** The id or key of the epic that you want to assign issues to. */
613
- epicIdOrKey: string;
614
- /**
615
- * @example {
616
- * "issues": [
617
- * "10001",
618
- * "PR-1",
619
- * "PR-3"
620
- * ]
621
- * }
622
- */
623
- requestBody: {
624
- issues?: string[];
625
- };
626
- }): Promise<void> {
627
- return this.getClientInstance()
628
- .request({
629
- path: "/rest/agile/1.0/epic/{epicIdOrKey}/issue",
630
- method: "POST",
631
- pathParams: {
632
- epicIdOrKey,
633
- },
634
- headers: {
635
- "Content-Type": "application/json",
636
- },
637
- body: requestBody,
638
- })
639
- .then(commonHttpClient.discardResult);
640
- }
641
- /**
642
- * Performs a partial update of the epic. A partial update means that fields not
643
- * present in the request JSON will not be updated. Valid values for color are
644
- * `color_1` to `color_9`. **Note:** This operation does not work for epics in
645
- * next-gen projects.
646
- *
647
- * @returns Updated epic
648
- *
649
- * example: {
650
- * "id": 37,
651
- * "self": "https://your-domain.atlassian.net/rest/agile/1.0/epic/23",
652
- * "name": "epic 1",
653
- * "summary": "epic 1 summary",
654
- * "color": {
655
- * "key": "color_4"
656
- * },
657
- * "done": true
658
- * }
659
- * @path {POST} /rest/agile/1.0/epic/{epicIdOrKey}
660
- */
661
- partiallyUpdateEpic({
662
- epicIdOrKey,
663
- requestBody,
664
- }: {
665
- /** The id or key of the epic to update. */
666
- epicIdOrKey: string;
667
- /**
668
- * @example {
669
- * "color": {
670
- * "key": "color_6"
671
- * },
672
- * "done": true,
673
- * "name": "epic 2",
674
- * "summary": "epic 2 summary"
675
- * }
676
- */
677
- requestBody: {
678
- color?: {
679
- key?:
680
- | "color_1"
681
- | "color_2"
682
- | "color_3"
683
- | "color_4"
684
- | "color_5"
685
- | "color_6"
686
- | "color_7"
687
- | "color_8"
688
- | "color_9"
689
- | "color_10"
690
- | "color_11"
691
- | "color_12"
692
- | "color_13"
693
- | "color_14";
694
- };
695
- done?: boolean;
696
- name?: string;
697
- summary?: string;
698
- };
699
- }): Promise<unknown> {
700
- return this.getClientInstance()
701
- .request({
702
- path: "/rest/agile/1.0/epic/{epicIdOrKey}",
703
- method: "POST",
704
- pathParams: {
705
- epicIdOrKey,
706
- },
707
- headers: {
708
- "Content-Type": "application/json",
709
- },
710
- body: requestBody,
711
- })
712
- .then(
713
- this.getClientInstance().responseHandler({
714
- 200: {
715
- "application/json": "json",
716
- },
717
- }),
718
- )
719
- .then(
720
- commonHttpClient.castResponse<{
721
- status: 200;
722
- mediaType: "application/json";
723
- body: unknown;
724
- }>(),
725
- )
726
- .then(
727
- validationSchemaStorage.validator(
728
- "EpicService.partiallyUpdateEpic.response",
729
- ),
730
- )
731
- .then(commonHttpClient.getBody);
732
- }
733
- /**
734
- * Moves (ranks) an epic before or after a given epic.
735
- *
736
- * If rankCustomFieldId is not defined, the default rank field will be used.
737
- *
738
- * **Note:** This operation does not work for epics in next-gen projects.
739
- *
740
- * @path {PUT} /rest/agile/1.0/epic/{epicIdOrKey}/rank
741
- */
742
- rankEpics({
743
- epicIdOrKey,
744
- requestBody,
745
- }: {
746
- /** The id or key of the epic to rank. */
747
- epicIdOrKey: string;
748
- /**
749
- * bean which contains the information where the given epic should be ranked.
750
- *
751
- * @example {
752
- * "rankBeforeEpic": "10000",
753
- * "rankCustomFieldId": 10521
754
- * }
755
- */
756
- requestBody: {
757
- rankAfterEpic?: string;
758
- rankBeforeEpic?: string;
759
- rankCustomFieldId?: number;
760
- };
761
- }): Promise<void> {
762
- return this.getClientInstance()
763
- .request({
764
- path: "/rest/agile/1.0/epic/{epicIdOrKey}/rank",
765
- method: "PUT",
766
- pathParams: {
767
- epicIdOrKey,
768
- },
769
- headers: {
770
- "Content-Type": "application/json",
771
- },
772
- body: requestBody,
773
- })
774
- .then(commonHttpClient.discardResult);
775
- }
776
- /**
777
- * Removes issues from epics. The user needs to have the edit issue permission for
778
- * all issue they want to remove from epics. The maximum number of issues that can
779
- * be moved in one operation is 50. **Note:** This operation does not work for
780
- * epics in next-gen projects. Instead, update the issue using `\{ fields: \{
781
- * parent: \{\} \} \}`
782
- *
783
- * @path {POST} /rest/agile/1.0/epic/none/issue
784
- */
785
- removeIssuesFromEpic({
786
- requestBody,
787
- }: {
788
- /**
789
- * @example {
790
- * "issues": [
791
- * "10001",
792
- * "PR-1",
793
- * "PR-3"
794
- * ]
795
- * }
796
- */
797
- requestBody: {
798
- issues?: string[];
799
- };
800
- }): Promise<void> {
801
- return this.getClientInstance()
802
- .request({
803
- path: "/rest/agile/1.0/epic/none/issue",
804
- method: "POST",
805
- headers: {
806
- "Content-Type": "application/json",
807
- },
808
- body: requestBody,
809
- })
810
- .then(commonHttpClient.discardResult);
811
- }
812
- static initialize() {
813
- validationSchemaStorage.registerExtensible(
814
- "EpicService.getEpic.response",
815
- z
816
- .object({
817
- status: z.literal(200),
818
- mediaType: z.literal("application/json"),
819
- body: z.unknown(),
820
- })
821
- .describe("EpicService.getEpic.response"),
822
- );
823
- validationSchemaStorage.registerExtensible(
824
- "EpicService.partiallyUpdateEpic.response",
825
- z
826
- .object({
827
- status: z.literal(200),
828
- mediaType: z.literal("application/json"),
829
- body: z.unknown(),
830
- })
831
- .describe("EpicService.partiallyUpdateEpic.response"),
832
- );
833
- validationSchemaStorage.registerExtensible(
834
- "EpicService.getIssuesForEpic.response",
835
- z
836
- .object({
837
- status: z.literal(200),
838
- mediaType: z.literal("application/json"),
839
- body: z.unknown(),
840
- })
841
- .describe("EpicService.getIssuesForEpic.response"),
842
- );
843
- validationSchemaStorage.registerExtensible(
844
- "EpicService.getIssuesWithoutEpic.response",
845
- z
846
- .object({
847
- status: z.literal(200),
848
- mediaType: z.literal("application/json"),
849
- body: z.unknown(),
850
- })
851
- .describe("EpicService.getIssuesWithoutEpic.response"),
852
- );
853
- }
854
- }