@agravity/public 9.4.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +97 -142
  4. package/api/api.ts +3 -0
  5. package/api/publicAIOperations.pub.agravity.ts +160 -0
  6. package/api/publicAssetManagement.pub.agravity.ts +67 -236
  7. package/api/publicAssetOperations.pub.agravity.ts +139 -380
  8. package/api/publicAssetPublishing.pub.agravity.ts +37 -132
  9. package/api/publicAssetRelationManagement.pub.agravity.ts +57 -192
  10. package/api/publicAssetVersioning.pub.agravity.ts +82 -249
  11. package/api/publicAuthenticationManagement.pub.agravity.ts +23 -106
  12. package/api/publicCollectionManagement.pub.agravity.ts +116 -321
  13. package/api/publicCollectionSecureUpload.pub.agravity.ts +29 -114
  14. package/api/publicCollectionTypeManagement.pub.agravity.ts +33 -136
  15. package/api/publicConfigurationManagement.pub.agravity.ts +11 -76
  16. package/api/publicDownloadFormatManagement.pub.agravity.ts +22 -101
  17. package/api/publicEndpoints.pub.agravity.ts +18 -89
  18. package/api/publicGeneralManagement.pub.agravity.ts +41 -146
  19. package/api/publicHelperTools.pub.agravity.ts +43 -174
  20. package/api/publicPortalManagement.pub.agravity.ts +74 -227
  21. package/api/publicPublishing.pub.agravity.ts +13 -84
  22. package/api/publicSavedSearch.pub.agravity.ts +13 -84
  23. package/api/publicSearchManagement.pub.agravity.ts +58 -203
  24. package/api/publicSharingManagement.pub.agravity.ts +50 -155
  25. package/api/publicSignalRConnectionManagement.pub.agravity.ts +11 -78
  26. package/api/publicStaticDefinedListManagement.pub.agravity.ts +37 -140
  27. package/api/publicTranslationManagement.pub.agravity.ts +48 -147
  28. package/api/publicWebAppData.pub.agravity.ts +26 -107
  29. package/api/publicWorkspaceManagement.pub.agravity.ts +24 -109
  30. package/api.base.service.ts +78 -0
  31. package/configuration.ts +33 -17
  32. package/index.ts +1 -0
  33. package/model/asset.pub.agravity.ts +6 -6
  34. package/model/assetBlob.pub.agravity.ts +15 -15
  35. package/model/assetIconRule.pub.agravity.ts +1 -1
  36. package/model/collTypeItem.pub.agravity.ts +1 -1
  37. package/model/collection.pub.agravity.ts +6 -6
  38. package/model/collectionType.pub.agravity.ts +6 -6
  39. package/model/collectionUDL.pub.agravity.ts +1 -1
  40. package/model/downloadFormat.pub.agravity.ts +1 -1
  41. package/model/downloadZipRequest.pub.agravity.ts +6 -6
  42. package/model/downloadZipStatus.pub.agravity.ts +6 -6
  43. package/model/entityIdName.pub.agravity.ts +1 -1
  44. package/model/groupAllAppData.pub.agravity.ts +1 -1
  45. package/model/permissionEntity.pub.agravity.ts +5 -5
  46. package/model/portalAuthentication.pub.agravity.ts +7 -7
  47. package/model/portalTheme.pub.agravity.ts +1 -1
  48. package/model/publishedAsset.pub.agravity.ts +1 -1
  49. package/model/savedSearch.pub.agravity.ts +1 -1
  50. package/model/staticDefinedList.pub.agravity.ts +1 -1
  51. package/model/whereParam.pub.agravity.ts +17 -17
  52. package/model/workspace.pub.agravity.ts +1 -1
  53. package/package.json +5 -4
  54. package/provide-api.ts +15 -0
  55. package/tsconfig.json +2 -0
@@ -26,6 +26,7 @@ import { VersionedAsset } from '../model/versionedAsset.pub.agravity';
26
26
  // @ts-ignore
27
27
  import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
28
28
  import { AgravityPublicConfiguration } from '../configuration';
29
+ import { BaseService } from '../api.base.service';
29
30
 
30
31
  export interface HttpAssetCreateUploadVersionRequestParams {
31
32
  /** The ID of the asset. */
@@ -84,81 +85,13 @@ export interface HttpVersionedAssetsGetRequestParams {
84
85
  @Injectable({
85
86
  providedIn: 'root'
86
87
  })
87
- export class PublicAssetVersioningService {
88
- protected basePath = 'http://localhost:7072/api';
89
- public defaultHeaders = new HttpHeaders();
90
- public configuration = new AgravityPublicConfiguration();
91
- public encoder: HttpParameterCodec;
92
-
88
+ export class PublicAssetVersioningService extends BaseService {
93
89
  constructor(
94
90
  protected httpClient: HttpClient,
95
91
  @Optional() @Inject(BASE_PATH) basePath: string | string[],
96
- @Optional() configuration: AgravityPublicConfiguration
92
+ @Optional() configuration?: AgravityPublicConfiguration
97
93
  ) {
98
- if (configuration) {
99
- this.configuration = configuration;
100
- }
101
- if (typeof this.configuration.basePath !== 'string') {
102
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
103
- if (firstBasePath != undefined) {
104
- basePath = firstBasePath;
105
- }
106
-
107
- if (typeof basePath !== 'string') {
108
- basePath = this.basePath;
109
- }
110
- this.configuration.basePath = basePath;
111
- }
112
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
113
- }
114
-
115
- /**
116
- * @param consumes string[] mime-types
117
- * @return true: consumes contains 'multipart/form-data', false: otherwise
118
- */
119
- private canConsumeForm(consumes: string[]): boolean {
120
- const form = 'multipart/form-data';
121
- for (const consume of consumes) {
122
- if (form === consume) {
123
- return true;
124
- }
125
- }
126
- return false;
127
- }
128
-
129
- // @ts-ignore
130
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
131
- if (typeof value === 'object' && value instanceof Date === false) {
132
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
133
- } else {
134
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
135
- }
136
- return httpParams;
137
- }
138
-
139
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
140
- if (value == null) {
141
- return httpParams;
142
- }
143
-
144
- if (typeof value === 'object') {
145
- if (Array.isArray(value)) {
146
- (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
147
- } else if (value instanceof Date) {
148
- if (key != null) {
149
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
150
- } else {
151
- throw Error('key may not be null if value is Date');
152
- }
153
- } else {
154
- Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
155
- }
156
- } else if (key != null) {
157
- httpParams = httpParams.append(key, value);
158
- } else {
159
- throw Error('key may not be null if value is not object or array');
160
- }
161
- return httpParams;
94
+ super(basePath, configuration);
162
95
  }
163
96
 
164
97
  /**
@@ -168,25 +101,25 @@ export class PublicAssetVersioningService {
168
101
  * @param reportProgress flag to report request and response progress.
169
102
  */
170
103
  public httpAssetCreateUploadVersion(
171
- requestParameters?: HttpAssetCreateUploadVersionRequestParams,
104
+ requestParameters: HttpAssetCreateUploadVersionRequestParams,
172
105
  observe?: 'body',
173
106
  reportProgress?: boolean,
174
107
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
175
108
  ): Observable<VersionedAsset>;
176
109
  public httpAssetCreateUploadVersion(
177
- requestParameters?: HttpAssetCreateUploadVersionRequestParams,
110
+ requestParameters: HttpAssetCreateUploadVersionRequestParams,
178
111
  observe?: 'response',
179
112
  reportProgress?: boolean,
180
113
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
181
114
  ): Observable<HttpResponse<VersionedAsset>>;
182
115
  public httpAssetCreateUploadVersion(
183
- requestParameters?: HttpAssetCreateUploadVersionRequestParams,
116
+ requestParameters: HttpAssetCreateUploadVersionRequestParams,
184
117
  observe?: 'events',
185
118
  reportProgress?: boolean,
186
119
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
187
120
  ): Observable<HttpEvent<VersionedAsset>>;
188
121
  public httpAssetCreateUploadVersion(
189
- requestParameters?: HttpAssetCreateUploadVersionRequestParams,
122
+ requestParameters: HttpAssetCreateUploadVersionRequestParams,
190
123
  observe: any = 'body',
191
124
  reportProgress: boolean = false,
192
125
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -203,32 +136,17 @@ export class PublicAssetVersioningService {
203
136
 
204
137
  let localVarHeaders = this.defaultHeaders;
205
138
 
206
- let localVarCredential: string | undefined;
207
139
  // authentication (function_key) required
208
- localVarCredential = this.configuration.lookupCredential('function_key');
209
- if (localVarCredential) {
210
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
211
- }
140
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
212
141
 
213
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
214
- if (localVarHttpHeaderAcceptSelected === undefined) {
215
- // to determine the Accept header
216
- const httpHeaderAccepts: string[] = ['application/json'];
217
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
218
- }
142
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
219
143
  if (localVarHttpHeaderAcceptSelected !== undefined) {
220
144
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
221
145
  }
222
146
 
223
- let localVarHttpContext: HttpContext | undefined = options && options.context;
224
- if (localVarHttpContext === undefined) {
225
- localVarHttpContext = new HttpContext();
226
- }
147
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
227
148
 
228
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
229
- if (localVarTransferCache === undefined) {
230
- localVarTransferCache = true;
231
- }
149
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
232
150
 
233
151
  // to determine the Content-Type header
234
152
  const consumes: string[] = ['multipart/form-data'];
@@ -275,11 +193,12 @@ export class PublicAssetVersioningService {
275
193
  }
276
194
 
277
195
  let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/versionsupload`;
278
- return this.httpClient.request<VersionedAsset>('post', `${this.configuration.basePath}${localVarPath}`, {
196
+ const { basePath, withCredentials } = this.configuration;
197
+ return this.httpClient.request<VersionedAsset>('post', `${basePath}${localVarPath}`, {
279
198
  context: localVarHttpContext,
280
199
  body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
281
200
  responseType: <any>responseType_,
282
- withCredentials: this.configuration.withCredentials,
201
+ ...(withCredentials ? { withCredentials } : {}),
283
202
  headers: localVarHeaders,
284
203
  observe: observe,
285
204
  transferCache: localVarTransferCache,
@@ -294,25 +213,25 @@ export class PublicAssetVersioningService {
294
213
  * @param reportProgress flag to report request and response progress.
295
214
  */
296
215
  public httpAssetCreateVersion(
297
- requestParameters?: HttpAssetCreateVersionRequestParams,
216
+ requestParameters: HttpAssetCreateVersionRequestParams,
298
217
  observe?: 'body',
299
218
  reportProgress?: boolean,
300
219
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
301
220
  ): Observable<VersionedAsset>;
302
221
  public httpAssetCreateVersion(
303
- requestParameters?: HttpAssetCreateVersionRequestParams,
222
+ requestParameters: HttpAssetCreateVersionRequestParams,
304
223
  observe?: 'response',
305
224
  reportProgress?: boolean,
306
225
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
307
226
  ): Observable<HttpResponse<VersionedAsset>>;
308
227
  public httpAssetCreateVersion(
309
- requestParameters?: HttpAssetCreateVersionRequestParams,
228
+ requestParameters: HttpAssetCreateVersionRequestParams,
310
229
  observe?: 'events',
311
230
  reportProgress?: boolean,
312
231
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
313
232
  ): Observable<HttpEvent<VersionedAsset>>;
314
233
  public httpAssetCreateVersion(
315
- requestParameters?: HttpAssetCreateVersionRequestParams,
234
+ requestParameters: HttpAssetCreateVersionRequestParams,
316
235
  observe: any = 'body',
317
236
  reportProgress: boolean = false,
318
237
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -328,32 +247,17 @@ export class PublicAssetVersioningService {
328
247
 
329
248
  let localVarHeaders = this.defaultHeaders;
330
249
 
331
- let localVarCredential: string | undefined;
332
250
  // authentication (function_key) required
333
- localVarCredential = this.configuration.lookupCredential('function_key');
334
- if (localVarCredential) {
335
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
336
- }
251
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
337
252
 
338
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
339
- if (localVarHttpHeaderAcceptSelected === undefined) {
340
- // to determine the Accept header
341
- const httpHeaderAccepts: string[] = ['application/json'];
342
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
343
- }
253
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
344
254
  if (localVarHttpHeaderAcceptSelected !== undefined) {
345
255
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
346
256
  }
347
257
 
348
- let localVarHttpContext: HttpContext | undefined = options && options.context;
349
- if (localVarHttpContext === undefined) {
350
- localVarHttpContext = new HttpContext();
351
- }
258
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
352
259
 
353
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
354
- if (localVarTransferCache === undefined) {
355
- localVarTransferCache = true;
356
- }
260
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
357
261
 
358
262
  // to determine the Content-Type header
359
263
  const consumes: string[] = ['application/json'];
@@ -374,11 +278,12 @@ export class PublicAssetVersioningService {
374
278
  }
375
279
 
376
280
  let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/versions`;
377
- return this.httpClient.request<VersionedAsset>('post', `${this.configuration.basePath}${localVarPath}`, {
281
+ const { basePath, withCredentials } = this.configuration;
282
+ return this.httpClient.request<VersionedAsset>('post', `${basePath}${localVarPath}`, {
378
283
  context: localVarHttpContext,
379
284
  body: versionedAsset,
380
285
  responseType: <any>responseType_,
381
- withCredentials: this.configuration.withCredentials,
286
+ ...(withCredentials ? { withCredentials } : {}),
382
287
  headers: localVarHeaders,
383
288
  observe: observe,
384
289
  transferCache: localVarTransferCache,
@@ -393,25 +298,25 @@ export class PublicAssetVersioningService {
393
298
  * @param reportProgress flag to report request and response progress.
394
299
  */
395
300
  public httpDeleteVersionedAssetsById(
396
- requestParameters?: HttpDeleteVersionedAssetsByIdRequestParams,
301
+ requestParameters: HttpDeleteVersionedAssetsByIdRequestParams,
397
302
  observe?: 'body',
398
303
  reportProgress?: boolean,
399
304
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
400
305
  ): Observable<any>;
401
306
  public httpDeleteVersionedAssetsById(
402
- requestParameters?: HttpDeleteVersionedAssetsByIdRequestParams,
307
+ requestParameters: HttpDeleteVersionedAssetsByIdRequestParams,
403
308
  observe?: 'response',
404
309
  reportProgress?: boolean,
405
310
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
406
311
  ): Observable<HttpResponse<any>>;
407
312
  public httpDeleteVersionedAssetsById(
408
- requestParameters?: HttpDeleteVersionedAssetsByIdRequestParams,
313
+ requestParameters: HttpDeleteVersionedAssetsByIdRequestParams,
409
314
  observe?: 'events',
410
315
  reportProgress?: boolean,
411
316
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
412
317
  ): Observable<HttpEvent<any>>;
413
318
  public httpDeleteVersionedAssetsById(
414
- requestParameters?: HttpDeleteVersionedAssetsByIdRequestParams,
319
+ requestParameters: HttpDeleteVersionedAssetsByIdRequestParams,
415
320
  observe: any = 'body',
416
321
  reportProgress: boolean = false,
417
322
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -427,32 +332,17 @@ export class PublicAssetVersioningService {
427
332
 
428
333
  let localVarHeaders = this.defaultHeaders;
429
334
 
430
- let localVarCredential: string | undefined;
431
335
  // authentication (function_key) required
432
- localVarCredential = this.configuration.lookupCredential('function_key');
433
- if (localVarCredential) {
434
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
435
- }
336
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
436
337
 
437
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
438
- if (localVarHttpHeaderAcceptSelected === undefined) {
439
- // to determine the Accept header
440
- const httpHeaderAccepts: string[] = ['application/json'];
441
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
442
- }
338
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
443
339
  if (localVarHttpHeaderAcceptSelected !== undefined) {
444
340
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
445
341
  }
446
342
 
447
- let localVarHttpContext: HttpContext | undefined = options && options.context;
448
- if (localVarHttpContext === undefined) {
449
- localVarHttpContext = new HttpContext();
450
- }
343
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
451
344
 
452
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
453
- if (localVarTransferCache === undefined) {
454
- localVarTransferCache = true;
455
- }
345
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
456
346
 
457
347
  let responseType_: 'text' | 'json' | 'blob' = 'json';
458
348
  if (localVarHttpHeaderAcceptSelected) {
@@ -466,10 +356,11 @@ export class PublicAssetVersioningService {
466
356
  }
467
357
 
468
358
  let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/versions/${this.configuration.encodeParam({ name: 'vNr', value: vNr, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
469
- return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`, {
359
+ const { basePath, withCredentials } = this.configuration;
360
+ return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`, {
470
361
  context: localVarHttpContext,
471
362
  responseType: <any>responseType_,
472
- withCredentials: this.configuration.withCredentials,
363
+ ...(withCredentials ? { withCredentials } : {}),
473
364
  headers: localVarHeaders,
474
365
  observe: observe,
475
366
  transferCache: localVarTransferCache,
@@ -484,25 +375,25 @@ export class PublicAssetVersioningService {
484
375
  * @param reportProgress flag to report request and response progress.
485
376
  */
486
377
  public httpGetVersionedAssetBlobById(
487
- requestParameters?: HttpGetVersionedAssetBlobByIdRequestParams,
378
+ requestParameters: HttpGetVersionedAssetBlobByIdRequestParams,
488
379
  observe?: 'body',
489
380
  reportProgress?: boolean,
490
381
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
491
382
  ): Observable<AssetBlob>;
492
383
  public httpGetVersionedAssetBlobById(
493
- requestParameters?: HttpGetVersionedAssetBlobByIdRequestParams,
384
+ requestParameters: HttpGetVersionedAssetBlobByIdRequestParams,
494
385
  observe?: 'response',
495
386
  reportProgress?: boolean,
496
387
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
497
388
  ): Observable<HttpResponse<AssetBlob>>;
498
389
  public httpGetVersionedAssetBlobById(
499
- requestParameters?: HttpGetVersionedAssetBlobByIdRequestParams,
390
+ requestParameters: HttpGetVersionedAssetBlobByIdRequestParams,
500
391
  observe?: 'events',
501
392
  reportProgress?: boolean,
502
393
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
503
394
  ): Observable<HttpEvent<AssetBlob>>;
504
395
  public httpGetVersionedAssetBlobById(
505
- requestParameters?: HttpGetVersionedAssetBlobByIdRequestParams,
396
+ requestParameters: HttpGetVersionedAssetBlobByIdRequestParams,
506
397
  observe: any = 'body',
507
398
  reportProgress: boolean = false,
508
399
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -518,38 +409,21 @@ export class PublicAssetVersioningService {
518
409
  const c = requestParameters?.c;
519
410
 
520
411
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
521
- if (c !== undefined && c !== null) {
522
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>c, 'c');
523
- }
412
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>c, 'c');
524
413
 
525
414
  let localVarHeaders = this.defaultHeaders;
526
415
 
527
- let localVarCredential: string | undefined;
528
416
  // authentication (function_key) required
529
- localVarCredential = this.configuration.lookupCredential('function_key');
530
- if (localVarCredential) {
531
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
532
- }
417
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
533
418
 
534
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
535
- if (localVarHttpHeaderAcceptSelected === undefined) {
536
- // to determine the Accept header
537
- const httpHeaderAccepts: string[] = ['application/json'];
538
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
539
- }
419
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
540
420
  if (localVarHttpHeaderAcceptSelected !== undefined) {
541
421
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
542
422
  }
543
423
 
544
- let localVarHttpContext: HttpContext | undefined = options && options.context;
545
- if (localVarHttpContext === undefined) {
546
- localVarHttpContext = new HttpContext();
547
- }
424
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
548
425
 
549
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
550
- if (localVarTransferCache === undefined) {
551
- localVarTransferCache = true;
552
- }
426
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
553
427
 
554
428
  let responseType_: 'text' | 'json' | 'blob' = 'json';
555
429
  if (localVarHttpHeaderAcceptSelected) {
@@ -563,11 +437,12 @@ export class PublicAssetVersioningService {
563
437
  }
564
438
 
565
439
  let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/versions/${this.configuration.encodeParam({ name: 'vNr', value: vNr, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: 'int32' })}/blobs`;
566
- return this.httpClient.request<AssetBlob>('get', `${this.configuration.basePath}${localVarPath}`, {
440
+ const { basePath, withCredentials } = this.configuration;
441
+ return this.httpClient.request<AssetBlob>('get', `${basePath}${localVarPath}`, {
567
442
  context: localVarHttpContext,
568
443
  params: localVarQueryParameters,
569
444
  responseType: <any>responseType_,
570
- withCredentials: this.configuration.withCredentials,
445
+ ...(withCredentials ? { withCredentials } : {}),
571
446
  headers: localVarHeaders,
572
447
  observe: observe,
573
448
  transferCache: localVarTransferCache,
@@ -582,25 +457,25 @@ export class PublicAssetVersioningService {
582
457
  * @param reportProgress flag to report request and response progress.
583
458
  */
584
459
  public httpRestoreVersionedAssetsById(
585
- requestParameters?: HttpRestoreVersionedAssetsByIdRequestParams,
460
+ requestParameters: HttpRestoreVersionedAssetsByIdRequestParams,
586
461
  observe?: 'body',
587
462
  reportProgress?: boolean,
588
463
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
589
464
  ): Observable<VersionedAsset>;
590
465
  public httpRestoreVersionedAssetsById(
591
- requestParameters?: HttpRestoreVersionedAssetsByIdRequestParams,
466
+ requestParameters: HttpRestoreVersionedAssetsByIdRequestParams,
592
467
  observe?: 'response',
593
468
  reportProgress?: boolean,
594
469
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
595
470
  ): Observable<HttpResponse<VersionedAsset>>;
596
471
  public httpRestoreVersionedAssetsById(
597
- requestParameters?: HttpRestoreVersionedAssetsByIdRequestParams,
472
+ requestParameters: HttpRestoreVersionedAssetsByIdRequestParams,
598
473
  observe?: 'events',
599
474
  reportProgress?: boolean,
600
475
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
601
476
  ): Observable<HttpEvent<VersionedAsset>>;
602
477
  public httpRestoreVersionedAssetsById(
603
- requestParameters?: HttpRestoreVersionedAssetsByIdRequestParams,
478
+ requestParameters: HttpRestoreVersionedAssetsByIdRequestParams,
604
479
  observe: any = 'body',
605
480
  reportProgress: boolean = false,
606
481
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -620,32 +495,17 @@ export class PublicAssetVersioningService {
620
495
 
621
496
  let localVarHeaders = this.defaultHeaders;
622
497
 
623
- let localVarCredential: string | undefined;
624
498
  // authentication (function_key) required
625
- localVarCredential = this.configuration.lookupCredential('function_key');
626
- if (localVarCredential) {
627
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
628
- }
499
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
629
500
 
630
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
631
- if (localVarHttpHeaderAcceptSelected === undefined) {
632
- // to determine the Accept header
633
- const httpHeaderAccepts: string[] = ['application/json'];
634
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
635
- }
501
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
636
502
  if (localVarHttpHeaderAcceptSelected !== undefined) {
637
503
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
638
504
  }
639
505
 
640
- let localVarHttpContext: HttpContext | undefined = options && options.context;
641
- if (localVarHttpContext === undefined) {
642
- localVarHttpContext = new HttpContext();
643
- }
506
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
644
507
 
645
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
646
- if (localVarTransferCache === undefined) {
647
- localVarTransferCache = true;
648
- }
508
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
649
509
 
650
510
  // to determine the Content-Type header
651
511
  const consumes: string[] = ['application/json'];
@@ -666,11 +526,12 @@ export class PublicAssetVersioningService {
666
526
  }
667
527
 
668
528
  let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/versions/${this.configuration.encodeParam({ name: 'vNr', value: vNr, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/restore`;
669
- return this.httpClient.request<VersionedAsset>('post', `${this.configuration.basePath}${localVarPath}`, {
529
+ const { basePath, withCredentials } = this.configuration;
530
+ return this.httpClient.request<VersionedAsset>('post', `${basePath}${localVarPath}`, {
670
531
  context: localVarHttpContext,
671
532
  body: versionedAsset,
672
533
  responseType: <any>responseType_,
673
- withCredentials: this.configuration.withCredentials,
534
+ ...(withCredentials ? { withCredentials } : {}),
674
535
  headers: localVarHeaders,
675
536
  observe: observe,
676
537
  transferCache: localVarTransferCache,
@@ -685,25 +546,25 @@ export class PublicAssetVersioningService {
685
546
  * @param reportProgress flag to report request and response progress.
686
547
  */
687
548
  public httpUpdateVersionedAssetsById(
688
- requestParameters?: HttpUpdateVersionedAssetsByIdRequestParams,
549
+ requestParameters: HttpUpdateVersionedAssetsByIdRequestParams,
689
550
  observe?: 'body',
690
551
  reportProgress?: boolean,
691
552
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
692
553
  ): Observable<VersionedAsset>;
693
554
  public httpUpdateVersionedAssetsById(
694
- requestParameters?: HttpUpdateVersionedAssetsByIdRequestParams,
555
+ requestParameters: HttpUpdateVersionedAssetsByIdRequestParams,
695
556
  observe?: 'response',
696
557
  reportProgress?: boolean,
697
558
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
698
559
  ): Observable<HttpResponse<VersionedAsset>>;
699
560
  public httpUpdateVersionedAssetsById(
700
- requestParameters?: HttpUpdateVersionedAssetsByIdRequestParams,
561
+ requestParameters: HttpUpdateVersionedAssetsByIdRequestParams,
701
562
  observe?: 'events',
702
563
  reportProgress?: boolean,
703
564
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
704
565
  ): Observable<HttpEvent<VersionedAsset>>;
705
566
  public httpUpdateVersionedAssetsById(
706
- requestParameters?: HttpUpdateVersionedAssetsByIdRequestParams,
567
+ requestParameters: HttpUpdateVersionedAssetsByIdRequestParams,
707
568
  observe: any = 'body',
708
569
  reportProgress: boolean = false,
709
570
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -719,32 +580,17 @@ export class PublicAssetVersioningService {
719
580
 
720
581
  let localVarHeaders = this.defaultHeaders;
721
582
 
722
- let localVarCredential: string | undefined;
723
583
  // authentication (function_key) required
724
- localVarCredential = this.configuration.lookupCredential('function_key');
725
- if (localVarCredential) {
726
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
727
- }
584
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
728
585
 
729
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
730
- if (localVarHttpHeaderAcceptSelected === undefined) {
731
- // to determine the Accept header
732
- const httpHeaderAccepts: string[] = ['application/json'];
733
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
734
- }
586
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
735
587
  if (localVarHttpHeaderAcceptSelected !== undefined) {
736
588
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
737
589
  }
738
590
 
739
- let localVarHttpContext: HttpContext | undefined = options && options.context;
740
- if (localVarHttpContext === undefined) {
741
- localVarHttpContext = new HttpContext();
742
- }
591
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
743
592
 
744
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
745
- if (localVarTransferCache === undefined) {
746
- localVarTransferCache = true;
747
- }
593
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
748
594
 
749
595
  let responseType_: 'text' | 'json' | 'blob' = 'json';
750
596
  if (localVarHttpHeaderAcceptSelected) {
@@ -758,10 +604,11 @@ export class PublicAssetVersioningService {
758
604
  }
759
605
 
760
606
  let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/versions/${this.configuration.encodeParam({ name: 'vNr', value: vNr, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
761
- return this.httpClient.request<VersionedAsset>('post', `${this.configuration.basePath}${localVarPath}`, {
607
+ const { basePath, withCredentials } = this.configuration;
608
+ return this.httpClient.request<VersionedAsset>('post', `${basePath}${localVarPath}`, {
762
609
  context: localVarHttpContext,
763
610
  responseType: <any>responseType_,
764
- withCredentials: this.configuration.withCredentials,
611
+ ...(withCredentials ? { withCredentials } : {}),
765
612
  headers: localVarHeaders,
766
613
  observe: observe,
767
614
  transferCache: localVarTransferCache,
@@ -776,25 +623,25 @@ export class PublicAssetVersioningService {
776
623
  * @param reportProgress flag to report request and response progress.
777
624
  */
778
625
  public httpVersionedAssetsGet(
779
- requestParameters?: HttpVersionedAssetsGetRequestParams,
626
+ requestParameters: HttpVersionedAssetsGetRequestParams,
780
627
  observe?: 'body',
781
628
  reportProgress?: boolean,
782
629
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
783
630
  ): Observable<VersionEntity>;
784
631
  public httpVersionedAssetsGet(
785
- requestParameters?: HttpVersionedAssetsGetRequestParams,
632
+ requestParameters: HttpVersionedAssetsGetRequestParams,
786
633
  observe?: 'response',
787
634
  reportProgress?: boolean,
788
635
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
789
636
  ): Observable<HttpResponse<VersionEntity>>;
790
637
  public httpVersionedAssetsGet(
791
- requestParameters?: HttpVersionedAssetsGetRequestParams,
638
+ requestParameters: HttpVersionedAssetsGetRequestParams,
792
639
  observe?: 'events',
793
640
  reportProgress?: boolean,
794
641
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
795
642
  ): Observable<HttpEvent<VersionEntity>>;
796
643
  public httpVersionedAssetsGet(
797
- requestParameters?: HttpVersionedAssetsGetRequestParams,
644
+ requestParameters: HttpVersionedAssetsGetRequestParams,
798
645
  observe: any = 'body',
799
646
  reportProgress: boolean = false,
800
647
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -806,32 +653,17 @@ export class PublicAssetVersioningService {
806
653
 
807
654
  let localVarHeaders = this.defaultHeaders;
808
655
 
809
- let localVarCredential: string | undefined;
810
656
  // authentication (function_key) required
811
- localVarCredential = this.configuration.lookupCredential('function_key');
812
- if (localVarCredential) {
813
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
814
- }
657
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
815
658
 
816
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
817
- if (localVarHttpHeaderAcceptSelected === undefined) {
818
- // to determine the Accept header
819
- const httpHeaderAccepts: string[] = ['application/json'];
820
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
821
- }
659
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
822
660
  if (localVarHttpHeaderAcceptSelected !== undefined) {
823
661
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
824
662
  }
825
663
 
826
- let localVarHttpContext: HttpContext | undefined = options && options.context;
827
- if (localVarHttpContext === undefined) {
828
- localVarHttpContext = new HttpContext();
829
- }
664
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
830
665
 
831
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
832
- if (localVarTransferCache === undefined) {
833
- localVarTransferCache = true;
834
- }
666
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
835
667
 
836
668
  let responseType_: 'text' | 'json' | 'blob' = 'json';
837
669
  if (localVarHttpHeaderAcceptSelected) {
@@ -845,10 +677,11 @@ export class PublicAssetVersioningService {
845
677
  }
846
678
 
847
679
  let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/versions`;
848
- return this.httpClient.request<VersionEntity>('get', `${this.configuration.basePath}${localVarPath}`, {
680
+ const { basePath, withCredentials } = this.configuration;
681
+ return this.httpClient.request<VersionEntity>('get', `${basePath}${localVarPath}`, {
849
682
  context: localVarHttpContext,
850
683
  responseType: <any>responseType_,
851
- withCredentials: this.configuration.withCredentials,
684
+ ...(withCredentials ? { withCredentials } : {}),
852
685
  headers: localVarHeaders,
853
686
  observe: observe,
854
687
  transferCache: localVarTransferCache,