@@ -8,17 +8,17 @@ export class IssueResolutions {
88 constructor ( private client : Client ) { }
99
1010 /**
11- * Returns a list of all issue resolution values.
11+ * @deprecated Returns a list of all issue resolution values.
1212 *
13- * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
14- * Permission to access Jira.
13+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
14+ * Permission to access Jira.
1515 */
1616 async getResolutions < T = Models . Resolution [ ] > ( callback : Callback < T > ) : Promise < void > ;
1717 /**
18- * Returns a list of all issue resolution values.
18+ * @deprecated Returns a list of all issue resolution values.
1919 *
20- * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
21- * Permission to access Jira.
20+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
21+ * Permission to access Jira.
2222 */
2323 async getResolutions < T = Models . Resolution [ ] > ( callback ?: never ) : Promise < T > ;
2424 async getResolutions < T = Models . Resolution [ ] > ( callback ?: Callback < T > ) : Promise < void | T > {
@@ -31,21 +31,162 @@ export class IssueResolutions {
3131 }
3232
3333 /**
34- * Returns an issue resolution value.
34+ * Creates an issue resolution.
35+ *
36+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
37+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
38+ */
39+ async createResolution < T = Models . ResolutionId > (
40+ parameters : Parameters . CreateResolution ,
41+ callback : Callback < T >
42+ ) : Promise < void > ;
43+ /**
44+ * Creates an issue resolution.
45+ *
46+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
47+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
48+ */
49+ async createResolution < T = Models . ResolutionId > (
50+ parameters : Parameters . CreateResolution ,
51+ callback ?: never
52+ ) : Promise < T > ;
53+ async createResolution < T = Models . ResolutionId > (
54+ parameters : Parameters . CreateResolution ,
55+ callback ?: Callback < T > ,
56+ ) : Promise < void | T > {
57+ const config : RequestConfig = {
58+ url : '/rest/api/2/resolution' ,
59+ method : 'POST' ,
60+ data : parameters ,
61+ } ;
62+
63+ return this . client . sendRequest ( config , callback ) ;
64+ }
65+
66+ /**
67+ * Sets default issue resolution.
68+ *
69+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
70+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
71+ */
72+ async setDefaultResolution < T = void > (
73+ parameters : Parameters . SetDefaultResolution ,
74+ callback : Callback < T >
75+ ) : Promise < void > ;
76+ /**
77+ * Sets default issue resolution.
78+ *
79+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
80+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
81+ */
82+ async setDefaultResolution < T = void > ( parameters : Parameters . SetDefaultResolution , callback ?: never ) : Promise < T > ;
83+ async setDefaultResolution < T = void > (
84+ parameters : Parameters . SetDefaultResolution ,
85+ callback ?: Callback < T > ,
86+ ) : Promise < void | T > {
87+ const config : RequestConfig = {
88+ url : '/rest/api/2/resolution/default' ,
89+ method : 'PUT' ,
90+ data : {
91+ id : parameters . id ,
92+ } ,
93+ } ;
94+
95+ return this . client . sendRequest ( config , callback ) ;
96+ }
97+
98+ /**
99+ * Changes the order of issue resolutions.
100+ *
101+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
102+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
103+ */
104+ async moveResolutions < T = void > ( parameters : Parameters . MoveResolutions , callback : Callback < T > ) : Promise < void > ;
105+ /**
106+ * Changes the order of issue resolutions.
107+ *
108+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
109+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
110+ */
111+ async moveResolutions < T = void > ( parameters : Parameters . MoveResolutions , callback ?: never ) : Promise < T > ;
112+ async moveResolutions < T = void > ( parameters : Parameters . MoveResolutions , callback ?: Callback < T > ) : Promise < void | T > {
113+ const config : RequestConfig = {
114+ url : '/rest/api/2/resolution/move' ,
115+ method : 'PUT' ,
116+ data : {
117+ ids : parameters . ids ,
118+ after : parameters . after ,
119+ position : parameters . position ,
120+ } ,
121+ } ;
122+
123+ return this . client . sendRequest ( config , callback ) ;
124+ }
125+
126+ /**
127+ * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of
128+ * resolutions. The list can contain all resolutions or a subset determined by any combination of these criteria:
129+ *
130+ * - A list of resolutions IDs.
131+ * - Whether the field configuration is a default. This returns resolutions from company-managed (classic) projects
132+ * only, as there is no concept of default resolutions in team-managed projects.
35133 *
36134 * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
37135 * Permission to access Jira.
38136 */
39- async getResolution < T = Models . Resolution > (
40- parameters : Parameters . GetResolution ,
137+ async searchResolutions < T = Models . PageResolution > (
138+ parameters : Parameters . SearchResolutions | undefined ,
41139 callback : Callback < T >
42140 ) : Promise < void > ;
43141 /**
44- * Returns an issue resolution value.
142+ * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of
143+ * resolutions. The list can contain all resolutions or a subset determined by any combination of these criteria:
144+ *
145+ * - A list of resolutions IDs.
146+ * - Whether the field configuration is a default. This returns resolutions from company-managed (classic) projects
147+ * only, as there is no concept of default resolutions in team-managed projects.
45148 *
46149 * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
47150 * Permission to access Jira.
48151 */
152+ async searchResolutions < T = Models . PageResolution > (
153+ parameters ?: Parameters . SearchResolutions ,
154+ callback ?: never
155+ ) : Promise < T > ;
156+ async searchResolutions < T = Models . PageResolution > (
157+ parameters ?: Parameters . SearchResolutions ,
158+ callback ?: Callback < T > ,
159+ ) : Promise < void | T > {
160+ const config : RequestConfig = {
161+ url : '/rest/api/2/resolution/search' ,
162+ method : 'GET' ,
163+ params : {
164+ startAt : parameters ?. startAt ,
165+ maxResults : parameters ?. maxResults ,
166+ id : parameters ?. id ,
167+ onlyDefault : parameters ?. onlyDefault ,
168+ } ,
169+ } ;
170+
171+ return this . client . sendRequest ( config , callback ) ;
172+ }
173+
174+ /**
175+ * @deprecated Returns an issue resolution value.
176+ *
177+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
178+ * Permission to access Jira.
179+ */
180+ async getResolution < T = Models . Resolution > (
181+ parameters : Parameters . GetResolution ,
182+ callback : Callback < T >
183+ ) : Promise < void > ;
184+ /**
185+ * @deprecated Returns an issue resolution value.
186+ *
187+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
188+ * Permission to access Jira.
189+ */
49190 async getResolution < T = Models . Resolution > ( parameters : Parameters . GetResolution , callback ?: never ) : Promise < T > ;
50191 async getResolution < T = Models . Resolution > (
51192 parameters : Parameters . GetResolution ,
@@ -58,4 +199,78 @@ export class IssueResolutions {
58199
59200 return this . client . sendRequest ( config , callback ) ;
60201 }
202+
203+ /**
204+ * Updates an issue resolution.
205+ *
206+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
207+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
208+ */
209+ async updateResolution < T = void > ( parameters : Parameters . UpdateResolution , callback : Callback < T > ) : Promise < void > ;
210+ /**
211+ * Updates an issue resolution.
212+ *
213+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
214+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
215+ */
216+ async updateResolution < T = void > ( parameters : Parameters . UpdateResolution , callback ?: never ) : Promise < T > ;
217+ async updateResolution < T = void > ( parameters : Parameters . UpdateResolution , callback ?: Callback < T > ) : Promise < void | T > {
218+ const config : RequestConfig = {
219+ url : `/rest/api/2/resolution/${ parameters . id } ` ,
220+ method : 'PUT' ,
221+ data : {
222+ ...parameters ,
223+ name : parameters . name ,
224+ description : parameters . description ,
225+ id : undefined ,
226+ } ,
227+ } ;
228+
229+ return this . client . sendRequest ( config , callback ) ;
230+ }
231+
232+ /**
233+ * Deletes an issue resolution.
234+ *
235+ * This operation is
236+ * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the
237+ * `location` link in the response to determine the status of the task and use [Get
238+ * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates.
239+ *
240+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
241+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
242+ */
243+ async deleteResolution < T = Models . TaskProgressObject > (
244+ parameters : Parameters . DeleteResolution ,
245+ callback : Callback < T >
246+ ) : Promise < void > ;
247+ /**
248+ * Deletes an issue resolution.
249+ *
250+ * This operation is
251+ * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the
252+ * `location` link in the response to determine the status of the task and use [Get
253+ * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates.
254+ *
255+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
256+ * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
257+ */
258+ async deleteResolution < T = Models . TaskProgressObject > (
259+ parameters : Parameters . DeleteResolution ,
260+ callback ?: never
261+ ) : Promise < T > ;
262+ async deleteResolution < T = Models . TaskProgressObject > (
263+ parameters : Parameters . DeleteResolution ,
264+ callback ?: Callback < T > ,
265+ ) : Promise < void | T > {
266+ const config : RequestConfig = {
267+ url : `/rest/api/2/resolution/${ parameters . id } ` ,
268+ method : 'DELETE' ,
269+ params : {
270+ replaceWith : parameters . replaceWith ,
271+ } ,
272+ } ;
273+
274+ return this . client . sendRequest ( config , callback ) ;
275+ }
61276}
0 commit comments