@agravity/public 9.4.0 → 10.0.0

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
@@ -28,6 +28,7 @@ import { SharedCollectionFull } from '../model/sharedCollectionFull.pub.agravity
28
28
  // @ts-ignore
29
29
  import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
30
30
  import { AgravityPublicConfiguration } from '../configuration';
31
+ import { BaseService } from '../api.base.service';
31
32
 
32
33
  export interface HttpQuickShareGetByIdRequestParams {
33
34
  /** The ID of the quick share. */
@@ -76,67 +77,13 @@ export interface HttpSharedCollectionsRequestZipByIdRequestParams {
76
77
  @Injectable({
77
78
  providedIn: 'root'
78
79
  })
79
- export class PublicSharingManagementService {
80
- protected basePath = 'http://localhost:7072/api';
81
- public defaultHeaders = new HttpHeaders();
82
- public configuration = new AgravityPublicConfiguration();
83
- public encoder: HttpParameterCodec;
84
-
80
+ export class PublicSharingManagementService extends BaseService {
85
81
  constructor(
86
82
  protected httpClient: HttpClient,
87
83
  @Optional() @Inject(BASE_PATH) basePath: string | string[],
88
- @Optional() configuration: AgravityPublicConfiguration
84
+ @Optional() configuration?: AgravityPublicConfiguration
89
85
  ) {
90
- if (configuration) {
91
- this.configuration = configuration;
92
- }
93
- if (typeof this.configuration.basePath !== 'string') {
94
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
95
- if (firstBasePath != undefined) {
96
- basePath = firstBasePath;
97
- }
98
-
99
- if (typeof basePath !== 'string') {
100
- basePath = this.basePath;
101
- }
102
- this.configuration.basePath = basePath;
103
- }
104
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
105
- }
106
-
107
- // @ts-ignore
108
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
109
- if (typeof value === 'object' && value instanceof Date === false) {
110
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
111
- } else {
112
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
113
- }
114
- return httpParams;
115
- }
116
-
117
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
118
- if (value == null) {
119
- return httpParams;
120
- }
121
-
122
- if (typeof value === 'object') {
123
- if (Array.isArray(value)) {
124
- (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
125
- } else if (value instanceof Date) {
126
- if (key != null) {
127
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
128
- } else {
129
- throw Error('key may not be null if value is Date');
130
- }
131
- } else {
132
- Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
133
- }
134
- } else if (key != null) {
135
- httpParams = httpParams.append(key, value);
136
- } else {
137
- throw Error('key may not be null if value is not object or array');
138
- }
139
- return httpParams;
86
+ super(basePath, configuration);
140
87
  }
141
88
 
142
89
  /**
@@ -146,25 +93,25 @@ export class PublicSharingManagementService {
146
93
  * @param reportProgress flag to report request and response progress.
147
94
  */
148
95
  public httpQuickShareGetById(
149
- requestParameters?: HttpQuickShareGetByIdRequestParams,
96
+ requestParameters: HttpQuickShareGetByIdRequestParams,
150
97
  observe?: 'body',
151
98
  reportProgress?: boolean,
152
99
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
153
100
  ): Observable<QuickShareFull>;
154
101
  public httpQuickShareGetById(
155
- requestParameters?: HttpQuickShareGetByIdRequestParams,
102
+ requestParameters: HttpQuickShareGetByIdRequestParams,
156
103
  observe?: 'response',
157
104
  reportProgress?: boolean,
158
105
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
159
106
  ): Observable<HttpResponse<QuickShareFull>>;
160
107
  public httpQuickShareGetById(
161
- requestParameters?: HttpQuickShareGetByIdRequestParams,
108
+ requestParameters: HttpQuickShareGetByIdRequestParams,
162
109
  observe?: 'events',
163
110
  reportProgress?: boolean,
164
111
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
165
112
  ): Observable<HttpEvent<QuickShareFull>>;
166
113
  public httpQuickShareGetById(
167
- requestParameters?: HttpQuickShareGetByIdRequestParams,
114
+ requestParameters: HttpQuickShareGetByIdRequestParams,
168
115
  observe: any = 'body',
169
116
  reportProgress: boolean = false,
170
117
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -178,37 +125,20 @@ export class PublicSharingManagementService {
178
125
  const orderby = requestParameters?.orderby;
179
126
 
180
127
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
181
- if (continuationToken !== undefined && continuationToken !== null) {
182
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>continuationToken, 'continuation_token');
183
- }
184
- if (limit !== undefined && limit !== null) {
185
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>limit, 'limit');
186
- }
187
- if (orderby !== undefined && orderby !== null) {
188
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>orderby, 'orderby');
189
- }
128
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>continuationToken, 'continuation_token');
129
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>limit, 'limit');
130
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>orderby, 'orderby');
190
131
 
191
132
  let localVarHeaders = this.defaultHeaders;
192
133
 
193
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
194
- if (localVarHttpHeaderAcceptSelected === undefined) {
195
- // to determine the Accept header
196
- const httpHeaderAccepts: string[] = ['application/json'];
197
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
198
- }
134
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
199
135
  if (localVarHttpHeaderAcceptSelected !== undefined) {
200
136
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
201
137
  }
202
138
 
203
- let localVarHttpContext: HttpContext | undefined = options && options.context;
204
- if (localVarHttpContext === undefined) {
205
- localVarHttpContext = new HttpContext();
206
- }
139
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
207
140
 
208
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
209
- if (localVarTransferCache === undefined) {
210
- localVarTransferCache = true;
211
- }
141
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
212
142
 
213
143
  let responseType_: 'text' | 'json' | 'blob' = 'json';
214
144
  if (localVarHttpHeaderAcceptSelected) {
@@ -222,11 +152,12 @@ export class PublicSharingManagementService {
222
152
  }
223
153
 
224
154
  let localVarPath = `/quickshares/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
225
- return this.httpClient.request<QuickShareFull>('get', `${this.configuration.basePath}${localVarPath}`, {
155
+ const { basePath, withCredentials } = this.configuration;
156
+ return this.httpClient.request<QuickShareFull>('get', `${basePath}${localVarPath}`, {
226
157
  context: localVarHttpContext,
227
158
  params: localVarQueryParameters,
228
159
  responseType: <any>responseType_,
229
- withCredentials: this.configuration.withCredentials,
160
+ ...(withCredentials ? { withCredentials } : {}),
230
161
  headers: localVarHeaders,
231
162
  observe: observe,
232
163
  transferCache: localVarTransferCache,
@@ -241,25 +172,25 @@ export class PublicSharingManagementService {
241
172
  * @param reportProgress flag to report request and response progress.
242
173
  */
243
174
  public httpSharedCollectionsGetById(
244
- requestParameters?: HttpSharedCollectionsGetByIdRequestParams,
175
+ requestParameters: HttpSharedCollectionsGetByIdRequestParams,
245
176
  observe?: 'body',
246
177
  reportProgress?: boolean,
247
178
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
248
179
  ): Observable<SharedCollectionFull>;
249
180
  public httpSharedCollectionsGetById(
250
- requestParameters?: HttpSharedCollectionsGetByIdRequestParams,
181
+ requestParameters: HttpSharedCollectionsGetByIdRequestParams,
251
182
  observe?: 'response',
252
183
  reportProgress?: boolean,
253
184
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
254
185
  ): Observable<HttpResponse<SharedCollectionFull>>;
255
186
  public httpSharedCollectionsGetById(
256
- requestParameters?: HttpSharedCollectionsGetByIdRequestParams,
187
+ requestParameters: HttpSharedCollectionsGetByIdRequestParams,
257
188
  observe?: 'events',
258
189
  reportProgress?: boolean,
259
190
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
260
191
  ): Observable<HttpEvent<SharedCollectionFull>>;
261
192
  public httpSharedCollectionsGetById(
262
- requestParameters?: HttpSharedCollectionsGetByIdRequestParams,
193
+ requestParameters: HttpSharedCollectionsGetByIdRequestParams,
263
194
  observe: any = 'body',
264
195
  reportProgress: boolean = false,
265
196
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -275,15 +206,9 @@ export class PublicSharingManagementService {
275
206
  const acceptLanguage = requestParameters?.acceptLanguage;
276
207
 
277
208
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
278
- if (continuationToken !== undefined && continuationToken !== null) {
279
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>continuationToken, 'continuation_token');
280
- }
281
- if (limit !== undefined && limit !== null) {
282
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>limit, 'limit');
283
- }
284
- if (orderby !== undefined && orderby !== null) {
285
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>orderby, 'orderby');
286
- }
209
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>continuationToken, 'continuation_token');
210
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>limit, 'limit');
211
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>orderby, 'orderby');
287
212
 
288
213
  let localVarHeaders = this.defaultHeaders;
289
214
  if (ayPassword !== undefined && ayPassword !== null) {
@@ -293,25 +218,14 @@ export class PublicSharingManagementService {
293
218
  localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
294
219
  }
295
220
 
296
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
297
- if (localVarHttpHeaderAcceptSelected === undefined) {
298
- // to determine the Accept header
299
- const httpHeaderAccepts: string[] = ['application/json'];
300
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
301
- }
221
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
302
222
  if (localVarHttpHeaderAcceptSelected !== undefined) {
303
223
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
304
224
  }
305
225
 
306
- let localVarHttpContext: HttpContext | undefined = options && options.context;
307
- if (localVarHttpContext === undefined) {
308
- localVarHttpContext = new HttpContext();
309
- }
226
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
310
227
 
311
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
312
- if (localVarTransferCache === undefined) {
313
- localVarTransferCache = true;
314
- }
228
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
315
229
 
316
230
  let responseType_: 'text' | 'json' | 'blob' = 'json';
317
231
  if (localVarHttpHeaderAcceptSelected) {
@@ -325,11 +239,12 @@ export class PublicSharingManagementService {
325
239
  }
326
240
 
327
241
  let localVarPath = `/shared/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
328
- return this.httpClient.request<SharedCollectionFull>('get', `${this.configuration.basePath}${localVarPath}`, {
242
+ const { basePath, withCredentials } = this.configuration;
243
+ return this.httpClient.request<SharedCollectionFull>('get', `${basePath}${localVarPath}`, {
329
244
  context: localVarHttpContext,
330
245
  params: localVarQueryParameters,
331
246
  responseType: <any>responseType_,
332
- withCredentials: this.configuration.withCredentials,
247
+ ...(withCredentials ? { withCredentials } : {}),
333
248
  headers: localVarHeaders,
334
249
  observe: observe,
335
250
  transferCache: localVarTransferCache,
@@ -344,25 +259,25 @@ export class PublicSharingManagementService {
344
259
  * @param reportProgress flag to report request and response progress.
345
260
  */
346
261
  public httpSharedCollectionsGetStatusZipById(
347
- requestParameters?: HttpSharedCollectionsGetStatusZipByIdRequestParams,
262
+ requestParameters: HttpSharedCollectionsGetStatusZipByIdRequestParams,
348
263
  observe?: 'body',
349
264
  reportProgress?: boolean,
350
265
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
351
266
  ): Observable<DownloadZipStatus>;
352
267
  public httpSharedCollectionsGetStatusZipById(
353
- requestParameters?: HttpSharedCollectionsGetStatusZipByIdRequestParams,
268
+ requestParameters: HttpSharedCollectionsGetStatusZipByIdRequestParams,
354
269
  observe?: 'response',
355
270
  reportProgress?: boolean,
356
271
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
357
272
  ): Observable<HttpResponse<DownloadZipStatus>>;
358
273
  public httpSharedCollectionsGetStatusZipById(
359
- requestParameters?: HttpSharedCollectionsGetStatusZipByIdRequestParams,
274
+ requestParameters: HttpSharedCollectionsGetStatusZipByIdRequestParams,
360
275
  observe?: 'events',
361
276
  reportProgress?: boolean,
362
277
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
363
278
  ): Observable<HttpEvent<DownloadZipStatus>>;
364
279
  public httpSharedCollectionsGetStatusZipById(
365
- requestParameters?: HttpSharedCollectionsGetStatusZipByIdRequestParams,
280
+ requestParameters: HttpSharedCollectionsGetStatusZipByIdRequestParams,
366
281
  observe: any = 'body',
367
282
  reportProgress: boolean = false,
368
283
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -382,25 +297,14 @@ export class PublicSharingManagementService {
382
297
  localVarHeaders = localVarHeaders.set('ay-password', String(ayPassword));
383
298
  }
384
299
 
385
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
386
- if (localVarHttpHeaderAcceptSelected === undefined) {
387
- // to determine the Accept header
388
- const httpHeaderAccepts: string[] = ['application/json'];
389
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
390
- }
300
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
391
301
  if (localVarHttpHeaderAcceptSelected !== undefined) {
392
302
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
393
303
  }
394
304
 
395
- let localVarHttpContext: HttpContext | undefined = options && options.context;
396
- if (localVarHttpContext === undefined) {
397
- localVarHttpContext = new HttpContext();
398
- }
305
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
399
306
 
400
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
401
- if (localVarTransferCache === undefined) {
402
- localVarTransferCache = true;
403
- }
307
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
404
308
 
405
309
  let responseType_: 'text' | 'json' | 'blob' = 'json';
406
310
  if (localVarHttpHeaderAcceptSelected) {
@@ -414,10 +318,11 @@ export class PublicSharingManagementService {
414
318
  }
415
319
 
416
320
  let localVarPath = `/shared/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/zip/${this.configuration.encodeParam({ name: 'zipId', value: zipId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
417
- return this.httpClient.request<DownloadZipStatus>('get', `${this.configuration.basePath}${localVarPath}`, {
321
+ const { basePath, withCredentials } = this.configuration;
322
+ return this.httpClient.request<DownloadZipStatus>('get', `${basePath}${localVarPath}`, {
418
323
  context: localVarHttpContext,
419
324
  responseType: <any>responseType_,
420
- withCredentials: this.configuration.withCredentials,
325
+ ...(withCredentials ? { withCredentials } : {}),
421
326
  headers: localVarHeaders,
422
327
  observe: observe,
423
328
  transferCache: localVarTransferCache,
@@ -432,25 +337,25 @@ export class PublicSharingManagementService {
432
337
  * @param reportProgress flag to report request and response progress.
433
338
  */
434
339
  public httpSharedCollectionsRequestZipById(
435
- requestParameters?: HttpSharedCollectionsRequestZipByIdRequestParams,
340
+ requestParameters: HttpSharedCollectionsRequestZipByIdRequestParams,
436
341
  observe?: 'body',
437
342
  reportProgress?: boolean,
438
343
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
439
344
  ): Observable<DownloadZipRequest>;
440
345
  public httpSharedCollectionsRequestZipById(
441
- requestParameters?: HttpSharedCollectionsRequestZipByIdRequestParams,
346
+ requestParameters: HttpSharedCollectionsRequestZipByIdRequestParams,
442
347
  observe?: 'response',
443
348
  reportProgress?: boolean,
444
349
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
445
350
  ): Observable<HttpResponse<DownloadZipRequest>>;
446
351
  public httpSharedCollectionsRequestZipById(
447
- requestParameters?: HttpSharedCollectionsRequestZipByIdRequestParams,
352
+ requestParameters: HttpSharedCollectionsRequestZipByIdRequestParams,
448
353
  observe?: 'events',
449
354
  reportProgress?: boolean,
450
355
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
451
356
  ): Observable<HttpEvent<DownloadZipRequest>>;
452
357
  public httpSharedCollectionsRequestZipById(
453
- requestParameters?: HttpSharedCollectionsRequestZipByIdRequestParams,
358
+ requestParameters: HttpSharedCollectionsRequestZipByIdRequestParams,
454
359
  observe: any = 'body',
455
360
  reportProgress: boolean = false,
456
361
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -467,25 +372,14 @@ export class PublicSharingManagementService {
467
372
  localVarHeaders = localVarHeaders.set('ay-password', String(ayPassword));
468
373
  }
469
374
 
470
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
471
- if (localVarHttpHeaderAcceptSelected === undefined) {
472
- // to determine the Accept header
473
- const httpHeaderAccepts: string[] = ['application/json'];
474
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
475
- }
375
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
476
376
  if (localVarHttpHeaderAcceptSelected !== undefined) {
477
377
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
478
378
  }
479
379
 
480
- let localVarHttpContext: HttpContext | undefined = options && options.context;
481
- if (localVarHttpContext === undefined) {
482
- localVarHttpContext = new HttpContext();
483
- }
380
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
484
381
 
485
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
486
- if (localVarTransferCache === undefined) {
487
- localVarTransferCache = true;
488
- }
382
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
489
383
 
490
384
  // to determine the Content-Type header
491
385
  const consumes: string[] = ['application/json'];
@@ -506,11 +400,12 @@ export class PublicSharingManagementService {
506
400
  }
507
401
 
508
402
  let localVarPath = `/shared/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/zip`;
509
- return this.httpClient.request<DownloadZipRequest>('post', `${this.configuration.basePath}${localVarPath}`, {
403
+ const { basePath, withCredentials } = this.configuration;
404
+ return this.httpClient.request<DownloadZipRequest>('post', `${basePath}${localVarPath}`, {
510
405
  context: localVarHttpContext,
511
406
  body: downloadZipRequest,
512
407
  responseType: <any>responseType_,
513
- withCredentials: this.configuration.withCredentials,
408
+ ...(withCredentials ? { withCredentials } : {}),
514
409
  headers: localVarHeaders,
515
410
  observe: observe,
516
411
  transferCache: localVarTransferCache,
@@ -22,71 +22,18 @@ import { SignalRConnectionInfo } from '../model/signalRConnectionInfo.pub.agravi
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
24
24
  import { AgravityPublicConfiguration } from '../configuration';
25
+ import { BaseService } from '../api.base.service';
25
26
 
26
27
  @Injectable({
27
28
  providedIn: 'root'
28
29
  })
29
- export class PublicSignalRConnectionManagementService {
30
- protected basePath = 'http://localhost:7072/api';
31
- public defaultHeaders = new HttpHeaders();
32
- public configuration = new AgravityPublicConfiguration();
33
- public encoder: HttpParameterCodec;
34
-
30
+ export class PublicSignalRConnectionManagementService extends BaseService {
35
31
  constructor(
36
32
  protected httpClient: HttpClient,
37
33
  @Optional() @Inject(BASE_PATH) basePath: string | string[],
38
- @Optional() configuration: AgravityPublicConfiguration
34
+ @Optional() configuration?: AgravityPublicConfiguration
39
35
  ) {
40
- if (configuration) {
41
- this.configuration = configuration;
42
- }
43
- if (typeof this.configuration.basePath !== 'string') {
44
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
45
- if (firstBasePath != undefined) {
46
- basePath = firstBasePath;
47
- }
48
-
49
- if (typeof basePath !== 'string') {
50
- basePath = this.basePath;
51
- }
52
- this.configuration.basePath = basePath;
53
- }
54
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
55
- }
56
-
57
- // @ts-ignore
58
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
59
- if (typeof value === 'object' && value instanceof Date === false) {
60
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
61
- } else {
62
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
63
- }
64
- return httpParams;
65
- }
66
-
67
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
68
- if (value == null) {
69
- return httpParams;
70
- }
71
-
72
- if (typeof value === 'object') {
73
- if (Array.isArray(value)) {
74
- (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
75
- } else if (value instanceof Date) {
76
- if (key != null) {
77
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
78
- } else {
79
- throw Error('key may not be null if value is Date');
80
- }
81
- } else {
82
- Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
83
- }
84
- } else if (key != null) {
85
- httpParams = httpParams.append(key, value);
86
- } else {
87
- throw Error('key may not be null if value is not object or array');
88
- }
89
- return httpParams;
36
+ super(basePath, configuration);
90
37
  }
91
38
 
92
39
  /**
@@ -116,32 +63,17 @@ export class PublicSignalRConnectionManagementService {
116
63
  ): Observable<any> {
117
64
  let localVarHeaders = this.defaultHeaders;
118
65
 
119
- let localVarCredential: string | undefined;
120
66
  // authentication (function_key) required
121
- localVarCredential = this.configuration.lookupCredential('function_key');
122
- if (localVarCredential) {
123
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
124
- }
67
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
125
68
 
126
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
127
- if (localVarHttpHeaderAcceptSelected === undefined) {
128
- // to determine the Accept header
129
- const httpHeaderAccepts: string[] = ['application/json'];
130
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
131
- }
69
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
132
70
  if (localVarHttpHeaderAcceptSelected !== undefined) {
133
71
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
134
72
  }
135
73
 
136
- let localVarHttpContext: HttpContext | undefined = options && options.context;
137
- if (localVarHttpContext === undefined) {
138
- localVarHttpContext = new HttpContext();
139
- }
74
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
140
75
 
141
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
142
- if (localVarTransferCache === undefined) {
143
- localVarTransferCache = true;
144
- }
76
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
145
77
 
146
78
  let responseType_: 'text' | 'json' | 'blob' = 'json';
147
79
  if (localVarHttpHeaderAcceptSelected) {
@@ -155,10 +87,11 @@ export class PublicSignalRConnectionManagementService {
155
87
  }
156
88
 
157
89
  let localVarPath = `/signalr/negotiate`;
158
- return this.httpClient.request<SignalRConnectionInfo>('post', `${this.configuration.basePath}${localVarPath}`, {
90
+ const { basePath, withCredentials } = this.configuration;
91
+ return this.httpClient.request<SignalRConnectionInfo>('post', `${basePath}${localVarPath}`, {
159
92
  context: localVarHttpContext,
160
93
  responseType: <any>responseType_,
161
- withCredentials: this.configuration.withCredentials,
94
+ ...(withCredentials ? { withCredentials } : {}),
162
95
  headers: localVarHeaders,
163
96
  observe: observe,
164
97
  transferCache: localVarTransferCache,