@@ -184,4 +184,133 @@ export class Avatars {
184
184
185
185
return this . client . sendRequest ( config , callback , { methodName : 'version2.avatars.deleteAvatar' } ) ;
186
186
}
187
+
188
+ /**
189
+ * Returns the default project or issue type avatar image.
190
+ *
191
+ * This operation can be accessed anonymously.
192
+ *
193
+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None.
194
+ */
195
+ async getAvatarImageByType < T = unknown > (
196
+ parameters : Parameters . GetAvatarImageByType ,
197
+ callback : Callback < T >
198
+ ) : Promise < void > ;
199
+ /**
200
+ * Returns the default project or issue type avatar image.
201
+ *
202
+ * This operation can be accessed anonymously.
203
+ *
204
+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None.
205
+ */
206
+ async getAvatarImageByType < T = unknown > ( parameters : Parameters . GetAvatarImageByType , callback ?: never ) : Promise < T > ;
207
+ async getAvatarImageByType < T = unknown > (
208
+ parameters : Parameters . GetAvatarImageByType ,
209
+ callback ?: Callback < T > ,
210
+ ) : Promise < void | T > {
211
+ const config : RequestConfig = {
212
+ url : `/rest/api/2/universal_avatar/view/type/${ parameters . type } ` ,
213
+ method : 'GET' ,
214
+ params : {
215
+ size : parameters . size ,
216
+ format : parameters . format ,
217
+ } ,
218
+ } ;
219
+
220
+ return this . client . sendRequest ( config , callback , { methodName : 'version2.avatars.getAvatarImageByType' } ) ;
221
+ }
222
+
223
+ /**
224
+ * Returns a project or issue type avatar image by ID.
225
+ *
226
+ * This operation can be accessed anonymously.
227
+ *
228
+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
229
+ *
230
+ * - For system avatars, none.
231
+ * - For custom project avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for
232
+ * the project the avatar belongs to.
233
+ * - For custom issue type avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg)
234
+ * for at least one project the issue type is used in.
235
+ */
236
+ async getAvatarImageByID < T = unknown > (
237
+ parameters : Parameters . GetAvatarImageByID ,
238
+ callback : Callback < T >
239
+ ) : Promise < void > ;
240
+ /**
241
+ * Returns a project or issue type avatar image by ID.
242
+ *
243
+ * This operation can be accessed anonymously.
244
+ *
245
+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
246
+ *
247
+ * - For system avatars, none.
248
+ * - For custom project avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for
249
+ * the project the avatar belongs to.
250
+ * - For custom issue type avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg)
251
+ * for at least one project the issue type is used in.
252
+ */
253
+ async getAvatarImageByID < T = unknown > ( parameters : Parameters . GetAvatarImageByID , callback ?: never ) : Promise < T > ;
254
+ async getAvatarImageByID < T = unknown > (
255
+ parameters : Parameters . GetAvatarImageByID ,
256
+ callback ?: Callback < T > ,
257
+ ) : Promise < void | T > {
258
+ const config : RequestConfig = {
259
+ url : `/rest/api/2/universal_avatar/view/type/${ parameters . type } /avatar/${ parameters . id } ` ,
260
+ method : 'GET' ,
261
+ params : {
262
+ size : parameters . size ,
263
+ format : parameters . format ,
264
+ } ,
265
+ } ;
266
+
267
+ return this . client . sendRequest ( config , callback , { methodName : 'version2.avatars.getAvatarImageByID' } ) ;
268
+ }
269
+
270
+ /**
271
+ * Returns the avatar image for a project or issue type.
272
+ *
273
+ * This operation can be accessed anonymously.
274
+ *
275
+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
276
+ *
277
+ * - For system avatars, none.
278
+ * - For custom project avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for
279
+ * the project the avatar belongs to.
280
+ * - For custom issue type avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg)
281
+ * for at least one project the issue type is used in.
282
+ */
283
+ async getAvatarImageByOwner < T = unknown > (
284
+ parameters : Parameters . GetAvatarImageByOwner ,
285
+ callback : Callback < T >
286
+ ) : Promise < void > ;
287
+ /**
288
+ * Returns the avatar image for a project or issue type.
289
+ *
290
+ * This operation can be accessed anonymously.
291
+ *
292
+ * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
293
+ *
294
+ * - For system avatars, none.
295
+ * - For custom project avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for
296
+ * the project the avatar belongs to.
297
+ * - For custom issue type avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg)
298
+ * for at least one project the issue type is used in.
299
+ */
300
+ async getAvatarImageByOwner < T = unknown > ( parameters : Parameters . GetAvatarImageByOwner , callback ?: never ) : Promise < T > ;
301
+ async getAvatarImageByOwner < T = unknown > (
302
+ parameters : Parameters . GetAvatarImageByOwner ,
303
+ callback ?: Callback < T > ,
304
+ ) : Promise < void | T > {
305
+ const config : RequestConfig = {
306
+ url : `/rest/api/2/universal_avatar/view/type/${ parameters . type } /owner/${ parameters . entityId } ` ,
307
+ method : 'GET' ,
308
+ params : {
309
+ size : parameters . size ,
310
+ format : parameters . format ,
311
+ } ,
312
+ } ;
313
+
314
+ return this . client . sendRequest ( config , callback , { methodName : 'version2.avatars.getAvatarImageByOwner' } ) ;
315
+ }
187
316
}
0 commit comments