@@ -20,6 +20,8 @@ import { Observable } from 'rxjs';
20
20
21
21
// @ts -ignore
22
22
import { UserProfile } from '../model/user-profile' ;
23
+ // @ts -ignore
24
+ import { UserSettings } from '../model/user-settings' ;
23
25
24
26
// @ts -ignore
25
27
import { BASE_PATH , COLLECTION_FORMATS } from '../variables' ;
@@ -216,4 +218,136 @@ export class UserService implements UserServiceInterface {
216
218
) ;
217
219
}
218
220
221
+ /**
222
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
223
+ * @param reportProgress flag to report request and response progress.
224
+ */
225
+ public getUserSettings ( observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < UserSettings > ;
226
+ public getUserSettings ( observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < HttpResponse < UserSettings > > ;
227
+ public getUserSettings ( observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < HttpEvent < UserSettings > > ;
228
+ public getUserSettings ( observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < any > {
229
+
230
+ let localVarHeaders = this . defaultHeaders ;
231
+
232
+ let localVarHttpHeaderAcceptSelected : string | undefined = options && options . httpHeaderAccept ;
233
+ if ( localVarHttpHeaderAcceptSelected === undefined ) {
234
+ // to determine the Accept header
235
+ const httpHeaderAccepts : string [ ] = [
236
+ 'application/json'
237
+ ] ;
238
+ localVarHttpHeaderAcceptSelected = this . configuration . selectHeaderAccept ( httpHeaderAccepts ) ;
239
+ }
240
+ if ( localVarHttpHeaderAcceptSelected !== undefined ) {
241
+ localVarHeaders = localVarHeaders . set ( 'Accept' , localVarHttpHeaderAcceptSelected ) ;
242
+ }
243
+
244
+ let localVarHttpContext : HttpContext | undefined = options && options . context ;
245
+ if ( localVarHttpContext === undefined ) {
246
+ localVarHttpContext = new HttpContext ( ) ;
247
+ }
248
+
249
+ let localVarTransferCache : boolean | undefined = options && options . transferCache ;
250
+ if ( localVarTransferCache === undefined ) {
251
+ localVarTransferCache = true ;
252
+ }
253
+
254
+
255
+ let responseType_ : 'text' | 'json' | 'blob' = 'json' ;
256
+ if ( localVarHttpHeaderAcceptSelected ) {
257
+ if ( localVarHttpHeaderAcceptSelected . startsWith ( 'text' ) ) {
258
+ responseType_ = 'text' ;
259
+ } else if ( this . configuration . isJsonMime ( localVarHttpHeaderAcceptSelected ) ) {
260
+ responseType_ = 'json' ;
261
+ } else {
262
+ responseType_ = 'blob' ;
263
+ }
264
+ }
265
+
266
+ let localVarPath = `/user/settings` ;
267
+ return this . httpClient . request < UserSettings > ( 'get' , `${ this . configuration . basePath } ${ localVarPath } ` ,
268
+ {
269
+ context : localVarHttpContext ,
270
+ responseType : < any > responseType_ ,
271
+ withCredentials : this . configuration . withCredentials ,
272
+ headers : localVarHeaders ,
273
+ observe : observe ,
274
+ transferCache : localVarTransferCache ,
275
+ reportProgress : reportProgress
276
+ }
277
+ ) ;
278
+ }
279
+
280
+ /**
281
+ * @param userSettings
282
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
283
+ * @param reportProgress flag to report request and response progress.
284
+ */
285
+ public updateUserSettings ( userSettings : UserSettings , observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < UserSettings > ;
286
+ public updateUserSettings ( userSettings : UserSettings , observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < HttpResponse < UserSettings > > ;
287
+ public updateUserSettings ( userSettings : UserSettings , observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < HttpEvent < UserSettings > > ;
288
+ public updateUserSettings ( userSettings : UserSettings , observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: 'application/json' , context ?: HttpContext , transferCache ?: boolean } ) : Observable < any > {
289
+ if ( userSettings === null || userSettings === undefined ) {
290
+ throw new Error ( 'Required parameter userSettings was null or undefined when calling updateUserSettings.' ) ;
291
+ }
292
+
293
+ let localVarHeaders = this . defaultHeaders ;
294
+
295
+ let localVarHttpHeaderAcceptSelected : string | undefined = options && options . httpHeaderAccept ;
296
+ if ( localVarHttpHeaderAcceptSelected === undefined ) {
297
+ // to determine the Accept header
298
+ const httpHeaderAccepts : string [ ] = [
299
+ 'application/json'
300
+ ] ;
301
+ localVarHttpHeaderAcceptSelected = this . configuration . selectHeaderAccept ( httpHeaderAccepts ) ;
302
+ }
303
+ if ( localVarHttpHeaderAcceptSelected !== undefined ) {
304
+ localVarHeaders = localVarHeaders . set ( 'Accept' , localVarHttpHeaderAcceptSelected ) ;
305
+ }
306
+
307
+ let localVarHttpContext : HttpContext | undefined = options && options . context ;
308
+ if ( localVarHttpContext === undefined ) {
309
+ localVarHttpContext = new HttpContext ( ) ;
310
+ }
311
+
312
+ let localVarTransferCache : boolean | undefined = options && options . transferCache ;
313
+ if ( localVarTransferCache === undefined ) {
314
+ localVarTransferCache = true ;
315
+ }
316
+
317
+
318
+ // to determine the Content-Type header
319
+ const consumes : string [ ] = [
320
+ 'application/json'
321
+ ] ;
322
+ const httpContentTypeSelected : string | undefined = this . configuration . selectHeaderContentType ( consumes ) ;
323
+ if ( httpContentTypeSelected !== undefined ) {
324
+ localVarHeaders = localVarHeaders . set ( 'Content-Type' , httpContentTypeSelected ) ;
325
+ }
326
+
327
+ let responseType_ : 'text' | 'json' | 'blob' = 'json' ;
328
+ if ( localVarHttpHeaderAcceptSelected ) {
329
+ if ( localVarHttpHeaderAcceptSelected . startsWith ( 'text' ) ) {
330
+ responseType_ = 'text' ;
331
+ } else if ( this . configuration . isJsonMime ( localVarHttpHeaderAcceptSelected ) ) {
332
+ responseType_ = 'json' ;
333
+ } else {
334
+ responseType_ = 'blob' ;
335
+ }
336
+ }
337
+
338
+ let localVarPath = `/user/settings` ;
339
+ return this . httpClient . request < UserSettings > ( 'post' , `${ this . configuration . basePath } ${ localVarPath } ` ,
340
+ {
341
+ context : localVarHttpContext ,
342
+ body : userSettings ,
343
+ responseType : < any > responseType_ ,
344
+ withCredentials : this . configuration . withCredentials ,
345
+ headers : localVarHeaders ,
346
+ observe : observe ,
347
+ transferCache : localVarTransferCache ,
348
+ reportProgress : reportProgress
349
+ }
350
+ ) ;
351
+ }
352
+
219
353
}
0 commit comments