@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
@@ -22,6 +22,7 @@ import { FrontendAppConfig } from '../model/frontendAppConfig.pub.agravity';
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
  export interface HttpConfigGetFrontendAllRequestParams {
27
28
  /** This returns only the custom created configurations. */
@@ -31,67 +32,13 @@ export interface HttpConfigGetFrontendAllRequestParams {
31
32
  @Injectable({
32
33
  providedIn: 'root'
33
34
  })
34
- export class PublicConfigurationManagementService {
35
- protected basePath = 'http://localhost:7072/api';
36
- public defaultHeaders = new HttpHeaders();
37
- public configuration = new AgravityPublicConfiguration();
38
- public encoder: HttpParameterCodec;
39
-
35
+ export class PublicConfigurationManagementService extends BaseService {
40
36
  constructor(
41
37
  protected httpClient: HttpClient,
42
38
  @Optional() @Inject(BASE_PATH) basePath: string | string[],
43
- @Optional() configuration: AgravityPublicConfiguration
39
+ @Optional() configuration?: AgravityPublicConfiguration
44
40
  ) {
45
- if (configuration) {
46
- this.configuration = configuration;
47
- }
48
- if (typeof this.configuration.basePath !== 'string') {
49
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
50
- if (firstBasePath != undefined) {
51
- basePath = firstBasePath;
52
- }
53
-
54
- if (typeof basePath !== 'string') {
55
- basePath = this.basePath;
56
- }
57
- this.configuration.basePath = basePath;
58
- }
59
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
60
- }
61
-
62
- // @ts-ignore
63
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
64
- if (typeof value === 'object' && value instanceof Date === false) {
65
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
66
- } else {
67
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
68
- }
69
- return httpParams;
70
- }
71
-
72
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
73
- if (value == null) {
74
- return httpParams;
75
- }
76
-
77
- if (typeof value === 'object') {
78
- if (Array.isArray(value)) {
79
- (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
80
- } else if (value instanceof Date) {
81
- if (key != null) {
82
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
83
- } else {
84
- throw Error('key may not be null if value is Date');
85
- }
86
- } else {
87
- Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
88
- }
89
- } else if (key != null) {
90
- httpParams = httpParams.append(key, value);
91
- } else {
92
- throw Error('key may not be null if value is not object or array');
93
- }
94
- return httpParams;
41
+ super(basePath, configuration);
95
42
  }
96
43
 
97
44
  /**
@@ -127,31 +74,18 @@ export class PublicConfigurationManagementService {
127
74
  const customonly = requestParameters?.customonly;
128
75
 
129
76
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
130
- if (customonly !== undefined && customonly !== null) {
131
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>customonly, 'customonly');
132
- }
77
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>customonly, 'customonly');
133
78
 
134
79
  let localVarHeaders = this.defaultHeaders;
135
80
 
136
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
137
- if (localVarHttpHeaderAcceptSelected === undefined) {
138
- // to determine the Accept header
139
- const httpHeaderAccepts: string[] = ['application/json'];
140
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
141
- }
81
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
142
82
  if (localVarHttpHeaderAcceptSelected !== undefined) {
143
83
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
144
84
  }
145
85
 
146
- let localVarHttpContext: HttpContext | undefined = options && options.context;
147
- if (localVarHttpContext === undefined) {
148
- localVarHttpContext = new HttpContext();
149
- }
86
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
150
87
 
151
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
152
- if (localVarTransferCache === undefined) {
153
- localVarTransferCache = true;
154
- }
88
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
155
89
 
156
90
  let responseType_: 'text' | 'json' | 'blob' = 'json';
157
91
  if (localVarHttpHeaderAcceptSelected) {
@@ -165,11 +99,12 @@ export class PublicConfigurationManagementService {
165
99
  }
166
100
 
167
101
  let localVarPath = `/config/frontend`;
168
- return this.httpClient.request<Array<FrontendAppConfig>>('get', `${this.configuration.basePath}${localVarPath}`, {
102
+ const { basePath, withCredentials } = this.configuration;
103
+ return this.httpClient.request<Array<FrontendAppConfig>>('get', `${basePath}${localVarPath}`, {
169
104
  context: localVarHttpContext,
170
105
  params: localVarQueryParameters,
171
106
  responseType: <any>responseType_,
172
- withCredentials: this.configuration.withCredentials,
107
+ ...(withCredentials ? { withCredentials } : {}),
173
108
  headers: localVarHeaders,
174
109
  observe: observe,
175
110
  transferCache: localVarTransferCache,
@@ -20,6 +20,7 @@ import { DownloadFormat } from '../model/downloadFormat.pub.agravity';
20
20
  // @ts-ignore
21
21
  import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
22
22
  import { AgravityPublicConfiguration } from '../configuration';
23
+ import { BaseService } from '../api.base.service';
23
24
 
24
25
  export interface HttpDownloadFormatsGetAllRequestParams {
25
26
  /** The requested language of the response. If not matching it falls back to default language. */
@@ -38,67 +39,13 @@ export interface HttpDownloadFormatsGetAllFromSharedRequestParams {
38
39
  @Injectable({
39
40
  providedIn: 'root'
40
41
  })
41
- export class PublicDownloadFormatManagementService {
42
- protected basePath = 'http://localhost:7072/api';
43
- public defaultHeaders = new HttpHeaders();
44
- public configuration = new AgravityPublicConfiguration();
45
- public encoder: HttpParameterCodec;
46
-
42
+ export class PublicDownloadFormatManagementService extends BaseService {
47
43
  constructor(
48
44
  protected httpClient: HttpClient,
49
45
  @Optional() @Inject(BASE_PATH) basePath: string | string[],
50
- @Optional() configuration: AgravityPublicConfiguration
46
+ @Optional() configuration?: AgravityPublicConfiguration
51
47
  ) {
52
- if (configuration) {
53
- this.configuration = configuration;
54
- }
55
- if (typeof this.configuration.basePath !== 'string') {
56
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
57
- if (firstBasePath != undefined) {
58
- basePath = firstBasePath;
59
- }
60
-
61
- if (typeof basePath !== 'string') {
62
- basePath = this.basePath;
63
- }
64
- this.configuration.basePath = basePath;
65
- }
66
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
67
- }
68
-
69
- // @ts-ignore
70
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
71
- if (typeof value === 'object' && value instanceof Date === false) {
72
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
73
- } else {
74
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
75
- }
76
- return httpParams;
77
- }
78
-
79
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
80
- if (value == null) {
81
- return httpParams;
82
- }
83
-
84
- if (typeof value === 'object') {
85
- if (Array.isArray(value)) {
86
- (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
87
- } else if (value instanceof Date) {
88
- if (key != null) {
89
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
90
- } else {
91
- throw Error('key may not be null if value is Date');
92
- }
93
- } else {
94
- Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
95
- }
96
- } else if (key != null) {
97
- httpParams = httpParams.append(key, value);
98
- } else {
99
- throw Error('key may not be null if value is not object or array');
100
- }
101
- return httpParams;
48
+ super(basePath, configuration);
102
49
  }
103
50
 
104
51
  /**
@@ -138,32 +85,17 @@ export class PublicDownloadFormatManagementService {
138
85
  localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
139
86
  }
140
87
 
141
- let localVarCredential: string | undefined;
142
88
  // authentication (function_key) required
143
- localVarCredential = this.configuration.lookupCredential('function_key');
144
- if (localVarCredential) {
145
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
146
- }
89
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
147
90
 
148
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
149
- if (localVarHttpHeaderAcceptSelected === undefined) {
150
- // to determine the Accept header
151
- const httpHeaderAccepts: string[] = ['application/json'];
152
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
153
- }
91
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
154
92
  if (localVarHttpHeaderAcceptSelected !== undefined) {
155
93
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
156
94
  }
157
95
 
158
- let localVarHttpContext: HttpContext | undefined = options && options.context;
159
- if (localVarHttpContext === undefined) {
160
- localVarHttpContext = new HttpContext();
161
- }
96
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
162
97
 
163
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
164
- if (localVarTransferCache === undefined) {
165
- localVarTransferCache = true;
166
- }
98
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
167
99
 
168
100
  let responseType_: 'text' | 'json' | 'blob' = 'json';
169
101
  if (localVarHttpHeaderAcceptSelected) {
@@ -177,10 +109,11 @@ export class PublicDownloadFormatManagementService {
177
109
  }
178
110
 
179
111
  let localVarPath = `/downloadformats`;
180
- return this.httpClient.request<Array<DownloadFormat>>('get', `${this.configuration.basePath}${localVarPath}`, {
112
+ const { basePath, withCredentials } = this.configuration;
113
+ return this.httpClient.request<Array<DownloadFormat>>('get', `${basePath}${localVarPath}`, {
181
114
  context: localVarHttpContext,
182
115
  responseType: <any>responseType_,
183
- withCredentials: this.configuration.withCredentials,
116
+ ...(withCredentials ? { withCredentials } : {}),
184
117
  headers: localVarHeaders,
185
118
  observe: observe,
186
119
  transferCache: localVarTransferCache,
@@ -195,25 +128,25 @@ export class PublicDownloadFormatManagementService {
195
128
  * @param reportProgress flag to report request and response progress.
196
129
  */
197
130
  public httpDownloadFormatsGetAllFromShared(
198
- requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
131
+ requestParameters: HttpDownloadFormatsGetAllFromSharedRequestParams,
199
132
  observe?: 'body',
200
133
  reportProgress?: boolean,
201
134
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
202
135
  ): Observable<Array<DownloadFormat>>;
203
136
  public httpDownloadFormatsGetAllFromShared(
204
- requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
137
+ requestParameters: HttpDownloadFormatsGetAllFromSharedRequestParams,
205
138
  observe?: 'response',
206
139
  reportProgress?: boolean,
207
140
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
208
141
  ): Observable<HttpResponse<Array<DownloadFormat>>>;
209
142
  public httpDownloadFormatsGetAllFromShared(
210
- requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
143
+ requestParameters: HttpDownloadFormatsGetAllFromSharedRequestParams,
211
144
  observe?: 'events',
212
145
  reportProgress?: boolean,
213
146
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
214
147
  ): Observable<HttpEvent<Array<DownloadFormat>>>;
215
148
  public httpDownloadFormatsGetAllFromShared(
216
- requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
149
+ requestParameters: HttpDownloadFormatsGetAllFromSharedRequestParams,
217
150
  observe: any = 'body',
218
151
  reportProgress: boolean = false,
219
152
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -226,9 +159,7 @@ export class PublicDownloadFormatManagementService {
226
159
  const acceptLanguage = requestParameters?.acceptLanguage;
227
160
 
228
161
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
229
- if (shareId !== undefined && shareId !== null) {
230
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>shareId, 'share_id');
231
- }
162
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>shareId, 'share_id');
232
163
 
233
164
  let localVarHeaders = this.defaultHeaders;
234
165
  if (ayPassword !== undefined && ayPassword !== null) {
@@ -238,25 +169,14 @@ export class PublicDownloadFormatManagementService {
238
169
  localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
239
170
  }
240
171
 
241
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
242
- if (localVarHttpHeaderAcceptSelected === undefined) {
243
- // to determine the Accept header
244
- const httpHeaderAccepts: string[] = ['application/json'];
245
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
246
- }
172
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
247
173
  if (localVarHttpHeaderAcceptSelected !== undefined) {
248
174
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
249
175
  }
250
176
 
251
- let localVarHttpContext: HttpContext | undefined = options && options.context;
252
- if (localVarHttpContext === undefined) {
253
- localVarHttpContext = new HttpContext();
254
- }
177
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
255
178
 
256
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
257
- if (localVarTransferCache === undefined) {
258
- localVarTransferCache = true;
259
- }
179
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
260
180
 
261
181
  let responseType_: 'text' | 'json' | 'blob' = 'json';
262
182
  if (localVarHttpHeaderAcceptSelected) {
@@ -270,11 +190,12 @@ export class PublicDownloadFormatManagementService {
270
190
  }
271
191
 
272
192
  let localVarPath = `/downloadformats-shared`;
273
- return this.httpClient.request<Array<DownloadFormat>>('get', `${this.configuration.basePath}${localVarPath}`, {
193
+ const { basePath, withCredentials } = this.configuration;
194
+ return this.httpClient.request<Array<DownloadFormat>>('get', `${basePath}${localVarPath}`, {
274
195
  context: localVarHttpContext,
275
196
  params: localVarQueryParameters,
276
197
  responseType: <any>responseType_,
277
- withCredentials: this.configuration.withCredentials,
198
+ ...(withCredentials ? { withCredentials } : {}),
278
199
  headers: localVarHeaders,
279
200
  observe: observe,
280
201
  transferCache: localVarTransferCache,
@@ -20,6 +20,7 @@ import { AgravityErrorResponse } from '../model/agravityErrorResponse.pub.agravi
20
20
  // @ts-ignore
21
21
  import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
22
22
  import { AgravityPublicConfiguration } from '../configuration';
23
+ import { BaseService } from '../api.base.service';
23
24
 
24
25
  export interface HttpAssetGetViewForPortalRequestParams {
25
26
  /** The ID of the asset. */
@@ -35,67 +36,13 @@ export interface HttpAssetGetViewForPortalRequestParams {
35
36
  @Injectable({
36
37
  providedIn: 'root'
37
38
  })
38
- export class PublicEndpointsService {
39
- protected basePath = 'http://localhost:7072/api';
40
- public defaultHeaders = new HttpHeaders();
41
- public configuration = new AgravityPublicConfiguration();
42
- public encoder: HttpParameterCodec;
43
-
39
+ export class PublicEndpointsService extends BaseService {
44
40
  constructor(
45
41
  protected httpClient: HttpClient,
46
42
  @Optional() @Inject(BASE_PATH) basePath: string | string[],
47
- @Optional() configuration: AgravityPublicConfiguration
43
+ @Optional() configuration?: AgravityPublicConfiguration
48
44
  ) {
49
- if (configuration) {
50
- this.configuration = configuration;
51
- }
52
- if (typeof this.configuration.basePath !== 'string') {
53
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
54
- if (firstBasePath != undefined) {
55
- basePath = firstBasePath;
56
- }
57
-
58
- if (typeof basePath !== 'string') {
59
- basePath = this.basePath;
60
- }
61
- this.configuration.basePath = basePath;
62
- }
63
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
64
- }
65
-
66
- // @ts-ignore
67
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
68
- if (typeof value === 'object' && value instanceof Date === false) {
69
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
70
- } else {
71
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
72
- }
73
- return httpParams;
74
- }
75
-
76
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
77
- if (value == null) {
78
- return httpParams;
79
- }
80
-
81
- if (typeof value === 'object') {
82
- if (Array.isArray(value)) {
83
- (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
84
- } else if (value instanceof Date) {
85
- if (key != null) {
86
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
87
- } else {
88
- throw Error('key may not be null if value is Date');
89
- }
90
- } else {
91
- Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
92
- }
93
- } else if (key != null) {
94
- httpParams = httpParams.append(key, value);
95
- } else {
96
- throw Error('key may not be null if value is not object or array');
97
- }
98
- return httpParams;
45
+ super(basePath, configuration);
99
46
  }
100
47
 
101
48
  /**
@@ -105,25 +52,25 @@ export class PublicEndpointsService {
105
52
  * @param reportProgress flag to report request and response progress.
106
53
  */
107
54
  public httpAssetGetViewForPortal(
108
- requestParameters?: HttpAssetGetViewForPortalRequestParams,
55
+ requestParameters: HttpAssetGetViewForPortalRequestParams,
109
56
  observe?: 'body',
110
57
  reportProgress?: boolean,
111
58
  options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
112
59
  ): Observable<Blob>;
113
60
  public httpAssetGetViewForPortal(
114
- requestParameters?: HttpAssetGetViewForPortalRequestParams,
61
+ requestParameters: HttpAssetGetViewForPortalRequestParams,
115
62
  observe?: 'response',
116
63
  reportProgress?: boolean,
117
64
  options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
118
65
  ): Observable<HttpResponse<Blob>>;
119
66
  public httpAssetGetViewForPortal(
120
- requestParameters?: HttpAssetGetViewForPortalRequestParams,
67
+ requestParameters: HttpAssetGetViewForPortalRequestParams,
121
68
  observe?: 'events',
122
69
  reportProgress?: boolean,
123
70
  options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
124
71
  ): Observable<HttpEvent<Blob>>;
125
72
  public httpAssetGetViewForPortal(
126
- requestParameters?: HttpAssetGetViewForPortalRequestParams,
73
+ requestParameters: HttpAssetGetViewForPortalRequestParams,
127
74
  observe: any = 'body',
128
75
  reportProgress: boolean = false,
129
76
  options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -143,47 +90,29 @@ export class PublicEndpointsService {
143
90
  const download = requestParameters?.download;
144
91
 
145
92
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
146
- if (assetId !== undefined && assetId !== null) {
147
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>assetId, 'asset_id');
148
- }
149
- if (portalId !== undefined && portalId !== null) {
150
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
151
- }
152
- if (format !== undefined && format !== null) {
153
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>format, 'format');
154
- }
155
- if (download !== undefined && download !== null) {
156
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>download, 'download');
157
- }
93
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>assetId, 'asset_id');
94
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
95
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>format, 'format');
96
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>download, 'download');
158
97
 
159
98
  let localVarHeaders = this.defaultHeaders;
160
99
 
161
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
162
- if (localVarHttpHeaderAcceptSelected === undefined) {
163
- // to determine the Accept header
164
- const httpHeaderAccepts: string[] = ['application/octet-stream', 'application/json'];
165
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
166
- }
100
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/octet-stream', 'application/json']);
167
101
  if (localVarHttpHeaderAcceptSelected !== undefined) {
168
102
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
169
103
  }
170
104
 
171
- let localVarHttpContext: HttpContext | undefined = options && options.context;
172
- if (localVarHttpContext === undefined) {
173
- localVarHttpContext = new HttpContext();
174
- }
105
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
175
106
 
176
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
177
- if (localVarTransferCache === undefined) {
178
- localVarTransferCache = true;
179
- }
107
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
180
108
 
181
109
  let localVarPath = `/public/view`;
182
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
110
+ const { basePath, withCredentials } = this.configuration;
111
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
183
112
  context: localVarHttpContext,
184
113
  params: localVarQueryParameters,
185
114
  responseType: 'blob',
186
- withCredentials: this.configuration.withCredentials,
115
+ ...(withCredentials ? { withCredentials } : {}),
187
116
  headers: localVarHeaders,
188
117
  observe: observe,
189
118
  transferCache: localVarTransferCache,