12
12
/* tslint:disable:no-unused-variable member-ordering */
13
13
14
14
import { HttpService , Injectable , Optional } from '@nestjs/common' ;
15
- import { AxiosResponse } from 'axios' ;
15
+ import type { AxiosRequestConfig , AxiosResponse } from 'axios' ;
16
16
import { Observable , from , of , switchMap } from 'rxjs' ;
17
17
import { ApiResponse } from '../model/apiResponse' ;
18
18
import { Pet } from '../model/pet' ;
@@ -49,9 +49,10 @@ export class PetService {
49
49
* @param pet Pet object that needs to be added to the store
50
50
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
51
51
* @param reportProgress flag to report request and response progress.
52
+ * @param {* } [addPetOpts.config] Override http request option.
52
53
*/
53
- public addPet ( pet : Pet , ) : Observable < AxiosResponse < Pet > > ;
54
- public addPet ( pet : Pet , ) : Observable < any > {
54
+ public addPet ( pet : Pet , addPetOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < Pet > > ;
55
+ public addPet ( pet : Pet , addPetOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
55
56
if ( pet === null || pet === undefined ) {
56
57
throw new Error ( 'Required parameter pet was null or undefined when calling addPet.' ) ;
57
58
}
@@ -96,7 +97,8 @@ export class PetService {
96
97
pet ,
97
98
{
98
99
withCredentials : this . configuration . withCredentials ,
99
- headers : headers
100
+ ...addPetOpts ?. config ,
101
+ headers : { ...headers , ...addPetOpts ?. config ?. headers } ,
100
102
}
101
103
) ;
102
104
} )
@@ -109,9 +111,10 @@ export class PetService {
109
111
* @param apiKey
110
112
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
111
113
* @param reportProgress flag to report request and response progress.
114
+ * @param {* } [deletePetOpts.config] Override http request option.
112
115
*/
113
- public deletePet ( petId : number , apiKey ?: string , ) : Observable < AxiosResponse < any > > ;
114
- public deletePet ( petId : number , apiKey ?: string , ) : Observable < any > {
116
+ public deletePet ( petId : number , apiKey ?: string , deletePetOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < any > > ;
117
+ public deletePet ( petId : number , apiKey ?: string , deletePetOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
115
118
if ( petId === null || petId === undefined ) {
116
119
throw new Error ( 'Required parameter petId was null or undefined when calling deletePet.' ) ;
117
120
}
@@ -150,7 +153,8 @@ export class PetService {
150
153
return this . httpClient . delete < any > ( `${ this . basePath } /pet/${ encodeURIComponent ( String ( petId ) ) } ` ,
151
154
{
152
155
withCredentials : this . configuration . withCredentials ,
153
- headers : headers
156
+ ...deletePetOpts ?. config ,
157
+ headers : { ...headers , ...deletePetOpts ?. config ?. headers } ,
154
158
}
155
159
) ;
156
160
} )
@@ -162,9 +166,10 @@ export class PetService {
162
166
* @param status Status values that need to be considered for filter
163
167
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
164
168
* @param reportProgress flag to report request and response progress.
169
+ * @param {* } [findPetsByStatusOpts.config] Override http request option.
165
170
*/
166
- public findPetsByStatus ( status : Array < 'available' | 'pending' | 'sold' > , ) : Observable < AxiosResponse < Array < Pet > > > ;
167
- public findPetsByStatus ( status : Array < 'available' | 'pending' | 'sold' > , ) : Observable < any > {
171
+ public findPetsByStatus ( status : Array < 'available' | 'pending' | 'sold' > , findPetsByStatusOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < Array < Pet > > > ;
172
+ public findPetsByStatus ( status : Array < 'available' | 'pending' | 'sold' > , findPetsByStatusOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
168
173
if ( status === null || status === undefined ) {
169
174
throw new Error ( 'Required parameter status was null or undefined when calling findPetsByStatus.' ) ;
170
175
}
@@ -208,7 +213,8 @@ export class PetService {
208
213
{
209
214
params : queryParameters ,
210
215
withCredentials : this . configuration . withCredentials ,
211
- headers : headers
216
+ ...findPetsByStatusOpts ?. config ,
217
+ headers : { ...headers , ...findPetsByStatusOpts ?. config ?. headers } ,
212
218
}
213
219
) ;
214
220
} )
@@ -220,9 +226,10 @@ export class PetService {
220
226
* @param tags Tags to filter by
221
227
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
222
228
* @param reportProgress flag to report request and response progress.
229
+ * @param {* } [findPetsByTagsOpts.config] Override http request option.
223
230
*/
224
- public findPetsByTags ( tags : Array < string > , ) : Observable < AxiosResponse < Array < Pet > > > ;
225
- public findPetsByTags ( tags : Array < string > , ) : Observable < any > {
231
+ public findPetsByTags ( tags : Array < string > , findPetsByTagsOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < Array < Pet > > > ;
232
+ public findPetsByTags ( tags : Array < string > , findPetsByTagsOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
226
233
if ( tags === null || tags === undefined ) {
227
234
throw new Error ( 'Required parameter tags was null or undefined when calling findPetsByTags.' ) ;
228
235
}
@@ -266,7 +273,8 @@ export class PetService {
266
273
{
267
274
params : queryParameters ,
268
275
withCredentials : this . configuration . withCredentials ,
269
- headers : headers
276
+ ...findPetsByTagsOpts ?. config ,
277
+ headers : { ...headers , ...findPetsByTagsOpts ?. config ?. headers } ,
270
278
}
271
279
) ;
272
280
} )
@@ -278,9 +286,10 @@ export class PetService {
278
286
* @param petId ID of pet to return
279
287
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
280
288
* @param reportProgress flag to report request and response progress.
289
+ * @param {* } [getPetByIdOpts.config] Override http request option.
281
290
*/
282
- public getPetById ( petId : number , ) : Observable < AxiosResponse < Pet > > ;
283
- public getPetById ( petId : number , ) : Observable < any > {
291
+ public getPetById ( petId : number , getPetByIdOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < Pet > > ;
292
+ public getPetById ( petId : number , getPetByIdOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
284
293
if ( petId === null || petId === undefined ) {
285
294
throw new Error ( 'Required parameter petId was null or undefined when calling getPetById.' ) ;
286
295
}
@@ -316,7 +325,8 @@ export class PetService {
316
325
return this . httpClient . get < Pet > ( `${ this . basePath } /pet/${ encodeURIComponent ( String ( petId ) ) } ` ,
317
326
{
318
327
withCredentials : this . configuration . withCredentials ,
319
- headers : headers
328
+ ...getPetByIdOpts ?. config ,
329
+ headers : { ...headers , ...getPetByIdOpts ?. config ?. headers } ,
320
330
}
321
331
) ;
322
332
} )
@@ -328,9 +338,10 @@ export class PetService {
328
338
* @param pet Pet object that needs to be added to the store
329
339
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
330
340
* @param reportProgress flag to report request and response progress.
341
+ * @param {* } [updatePetOpts.config] Override http request option.
331
342
*/
332
- public updatePet ( pet : Pet , ) : Observable < AxiosResponse < Pet > > ;
333
- public updatePet ( pet : Pet , ) : Observable < any > {
343
+ public updatePet ( pet : Pet , updatePetOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < Pet > > ;
344
+ public updatePet ( pet : Pet , updatePetOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
334
345
if ( pet === null || pet === undefined ) {
335
346
throw new Error ( 'Required parameter pet was null or undefined when calling updatePet.' ) ;
336
347
}
@@ -375,7 +386,8 @@ export class PetService {
375
386
pet ,
376
387
{
377
388
withCredentials : this . configuration . withCredentials ,
378
- headers : headers
389
+ ...updatePetOpts ?. config ,
390
+ headers : { ...headers , ...updatePetOpts ?. config ?. headers } ,
379
391
}
380
392
) ;
381
393
} )
@@ -389,9 +401,10 @@ export class PetService {
389
401
* @param status Updated status of the pet
390
402
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
391
403
* @param reportProgress flag to report request and response progress.
404
+ * @param {* } [updatePetWithFormOpts.config] Override http request option.
392
405
*/
393
- public updatePetWithForm ( petId : number , name ?: string , status ?: string , ) : Observable < AxiosResponse < any > > ;
394
- public updatePetWithForm ( petId : number , name ?: string , status ?: string , ) : Observable < any > {
406
+ public updatePetWithForm ( petId : number , name ?: string , status ?: string , updatePetWithFormOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < any > > ;
407
+ public updatePetWithForm ( petId : number , name ?: string , status ?: string , updatePetWithFormOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
395
408
if ( petId === null || petId === undefined ) {
396
409
throw new Error ( 'Required parameter petId was null or undefined when calling updatePetWithForm.' ) ;
397
410
}
@@ -449,7 +462,8 @@ export class PetService {
449
462
convertFormParamsToString ? formParams ! . toString ( ) : formParams ! ,
450
463
{
451
464
withCredentials : this . configuration . withCredentials ,
452
- headers : headers
465
+ ...updatePetWithFormOpts ?. config ,
466
+ headers : { ...headers , ...updatePetWithFormOpts ?. config ?. headers } ,
453
467
}
454
468
) ;
455
469
} )
@@ -463,9 +477,10 @@ export class PetService {
463
477
* @param file file to upload
464
478
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
465
479
* @param reportProgress flag to report request and response progress.
480
+ * @param {* } [uploadFileOpts.config] Override http request option.
466
481
*/
467
- public uploadFile ( petId : number , additionalMetadata ?: string , file ?: Blob , ) : Observable < AxiosResponse < ApiResponse > > ;
468
- public uploadFile ( petId : number , additionalMetadata ?: string , file ?: Blob , ) : Observable < any > {
482
+ public uploadFile ( petId : number , additionalMetadata ?: string , file ?: Blob , uploadFileOpts ?: { config ?: AxiosRequestConfig } ) : Observable < AxiosResponse < ApiResponse > > ;
483
+ public uploadFile ( petId : number , additionalMetadata ?: string , file ?: Blob , uploadFileOpts ?: { config ?: AxiosRequestConfig } ) : Observable < any > {
469
484
if ( petId === null || petId === undefined ) {
470
485
throw new Error ( 'Required parameter petId was null or undefined when calling uploadFile.' ) ;
471
486
}
@@ -528,7 +543,8 @@ export class PetService {
528
543
convertFormParamsToString ? formParams ! . toString ( ) : formParams ! ,
529
544
{
530
545
withCredentials : this . configuration . withCredentials ,
531
- headers : headers
546
+ ...uploadFileOpts ?. config ,
547
+ headers : { ...headers , ...uploadFileOpts ?. config ?. headers } ,
532
548
}
533
549
) ;
534
550
} )
0 commit comments