@@ -2,7 +2,7 @@ import type * as Models from './models';
2
2
import type * as Parameters from './parameters' ;
3
3
import type { Client } from '../clients' ;
4
4
import type { Callback } from '../callback' ;
5
- import type { Request } from '../requestConfig ' ;
5
+ import type { Request } from '../request ' ;
6
6
import { FormDataService } from '../services/formDataService' ;
7
7
8
8
export class IssueAttachments {
@@ -380,10 +380,7 @@ export class IssueAttachments {
380
380
* to view the issue.
381
381
*/
382
382
async addAttachment < T = Models . Attachment [ ] > ( parameters : Parameters . AddAttachment , callback ?: never ) : Promise < T > ;
383
- async addAttachment < T = Models . Attachment [ ] > (
384
- parameters : Parameters . AddAttachment ,
385
- callback ?: Callback < T > ,
386
- ) : Promise < void | T > {
383
+ async addAttachment < T = Models . Attachment [ ] > ( parameters : Parameters . AddAttachment ) : Promise < void | T > {
387
384
const formDataService = new FormDataService ( ) ;
388
385
const attachments = Array . isArray ( parameters . attachment ) ? parameters . attachment : [ parameters . attachment ] ;
389
386
@@ -396,18 +393,18 @@ export class IssueAttachments {
396
393
) ,
397
394
) ;
398
395
399
- const config : RequestConfig = {
396
+ const config : Request = {
400
397
url : `/rest/api/2/issue/${ parameters . issueIdOrKey } /attachments` ,
401
398
method : 'POST' ,
402
399
headers : {
403
400
'X-Atlassian-Token' : 'no-check' ,
404
401
'Content-Type' : 'multipart/form-data' ,
405
402
} ,
406
- data : formDataService . formData ,
407
- maxBodyLength : Infinity ,
408
- maxContentLength : Infinity ,
403
+ body : formDataService . formData ,
404
+ // maxBodyLength: Infinity, // todo needed?
405
+ // maxContentLength: Infinity, // todo needed?
409
406
} ;
410
407
411
- return this . client . sendRequest ( config , callback ) ;
408
+ return this . client . sendRequest ( config ) ;
412
409
}
413
410
}
0 commit comments