@agravity/private 10.3.4 → 11.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.
- package/.openapi-generator/FILES +1 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +3 -3
- package/api/aIOperations.agravity.ts +38 -14
- package/api/assetIconRuleManagement.agravity.ts +33 -19
- package/api/assetManagement.agravity.ts +74 -37
- package/api/assetOperations.agravity.ts +175 -86
- package/api/assetPublishing.agravity.ts +33 -14
- package/api/assetRelationManagement.agravity.ts +37 -21
- package/api/assetRelationTypeManagement.agravity.ts +36 -20
- package/api/assetVersioning.agravity.ts +33 -14
- package/api/authenticationManagement.agravity.ts +57 -24
- package/api/collectionManagement.agravity.ts +86 -46
- package/api/collectionShareManagement.agravity.ts +29 -15
- package/api/collectionTypeItemBlueprintManagement.agravity.ts +26 -15
- package/api/collectionTypeManagement.agravity.ts +50 -27
- package/api/commentsManagement.agravity.ts +14 -6
- package/api/configurationManagement.agravity.ts +25 -13
- package/api/dashboardWidgetManagement.agravity.ts +21 -10
- package/api/dataImportExportManagement.agravity.ts +49 -25
- package/api/downloadFormatManagement.agravity.ts +36 -20
- package/api/downloadZip.agravity.ts +11 -5
- package/api/featuresManagement.agravity.ts +5 -3
- package/api/generalManagement.agravity.ts +43 -22
- package/api/helperTools.agravity.ts +76 -35
- package/api/historyEntryManagement.agravity.ts +9 -6
- package/api/iccProfileManagement.agravity.ts +5 -3
- package/api/listBlobs.agravity.ts +8 -4
- package/api/listQueues.agravity.ts +5 -3
- package/api/listTables.agravity.ts +5 -3
- package/api/notificationManagement.agravity.ts +11 -5
- package/api/permissionsManagement.agravity.ts +14 -6
- package/api/portalManagement.agravity.ts +26 -10
- package/api/portalsUsersManagement.agravity.ts +17 -7
- package/api/profilesManagement.agravity.ts +20 -8
- package/api/publishing.agravity.ts +11 -7
- package/api/quickshareManagement.agravity.ts +36 -19
- package/api/savedSearchManagement.agravity.ts +23 -13
- package/api/searchManagement.agravity.ts +100 -54
- package/api/searchSettingsOperations.agravity.ts +8 -4
- package/api/secureUpload.agravity.ts +28 -14
- package/api/signalRConnectionManagement.agravity.ts +11 -5
- package/api/staticDefinedListManagement.agravity.ts +35 -20
- package/api/stockImport.agravity.ts +22 -13
- package/api/structureImport.agravity.ts +13 -8
- package/api/translationManagement.agravity.ts +32 -17
- package/api/webAppData.agravity.ts +14 -6
- package/api/widgetLayoutManagement.agravity.ts +8 -4
- package/api/wordpressManagement.agravity.ts +28 -16
- package/api/workspaceManagement.agravity.ts +39 -21
- package/api.base.service.ts +41 -27
- package/configuration.ts +3 -2
- package/encoder.ts +15 -0
- package/package.json +9 -9
- package/query.params.ts +165 -0
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
/* tslint:disable:no-unused-variable member-ordering */
|
|
11
11
|
|
|
12
12
|
import { Inject, Injectable, Optional } from '@angular/core';
|
|
13
|
-
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent,
|
|
14
|
-
import { CustomHttpParameterCodec } from '../encoder';
|
|
13
|
+
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpContext } from '@angular/common/http';
|
|
15
14
|
import { Observable } from 'rxjs';
|
|
15
|
+
import { OpenApiHttpParams, QueryParamStyle } from '../query.params';
|
|
16
16
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import { AgravityErrorResponse } from '../model/agravityErrorResponse.agravity';
|
|
@@ -64,9 +64,11 @@ export class WordpressManagementService extends BaseService {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* This endpoint creates a Wordpress Page
|
|
67
|
+
* @endpoint post /wordpresspage
|
|
67
68
|
* @param requestParameters
|
|
68
69
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
69
70
|
* @param reportProgress flag to report request and response progress.
|
|
71
|
+
* @param options additional options
|
|
70
72
|
*/
|
|
71
73
|
public httpWordpressPage(
|
|
72
74
|
requestParameters: HttpWordpressPageRequestParams,
|
|
@@ -113,11 +115,15 @@ export class WordpressManagementService extends BaseService {
|
|
|
113
115
|
throw new Error('Required parameter asset was null or undefined when calling httpWordpressPage.');
|
|
114
116
|
}
|
|
115
117
|
|
|
116
|
-
let localVarQueryParameters = new
|
|
117
|
-
|
|
118
|
-
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>
|
|
119
|
-
|
|
120
|
-
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>
|
|
118
|
+
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
119
|
+
|
|
120
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'page_title', <any>pageTitle, QueryParamStyle.Form, true);
|
|
121
|
+
|
|
122
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'page_content_before', <any>pageContentBefore, QueryParamStyle.Form, true);
|
|
123
|
+
|
|
124
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'page_image', <any>pageImage, QueryParamStyle.Form, true);
|
|
125
|
+
|
|
126
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'page_content_after', <any>pageContentAfter, QueryParamStyle.Form, true);
|
|
121
127
|
|
|
122
128
|
let localVarHeaders = this.defaultHeaders;
|
|
123
129
|
|
|
@@ -156,21 +162,23 @@ export class WordpressManagementService extends BaseService {
|
|
|
156
162
|
return this.httpClient.request<number>('post', `${basePath}${localVarPath}`, {
|
|
157
163
|
context: localVarHttpContext,
|
|
158
164
|
body: asset,
|
|
159
|
-
params: localVarQueryParameters,
|
|
165
|
+
params: localVarQueryParameters.toHttpParams(),
|
|
160
166
|
responseType: <any>responseType_,
|
|
161
167
|
...(withCredentials ? { withCredentials } : {}),
|
|
162
168
|
headers: localVarHeaders,
|
|
163
169
|
observe: observe,
|
|
164
|
-
transferCache: localVarTransferCache,
|
|
170
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
165
171
|
reportProgress: reportProgress
|
|
166
172
|
});
|
|
167
173
|
}
|
|
168
174
|
|
|
169
175
|
/**
|
|
170
176
|
* This endpoint creates a Wordpress Post
|
|
177
|
+
* @endpoint post /wordpresspost
|
|
171
178
|
* @param requestParameters
|
|
172
179
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
173
180
|
* @param reportProgress flag to report request and response progress.
|
|
181
|
+
* @param options additional options
|
|
174
182
|
*/
|
|
175
183
|
public httpWordpressPost(
|
|
176
184
|
requestParameters: HttpWordpressPostRequestParams,
|
|
@@ -217,11 +225,15 @@ export class WordpressManagementService extends BaseService {
|
|
|
217
225
|
throw new Error('Required parameter asset was null or undefined when calling httpWordpressPost.');
|
|
218
226
|
}
|
|
219
227
|
|
|
220
|
-
let localVarQueryParameters = new
|
|
221
|
-
|
|
222
|
-
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>
|
|
223
|
-
|
|
224
|
-
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>
|
|
228
|
+
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
229
|
+
|
|
230
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'post_title', <any>postTitle, QueryParamStyle.Form, true);
|
|
231
|
+
|
|
232
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'post_content_before', <any>postContentBefore, QueryParamStyle.Form, true);
|
|
233
|
+
|
|
234
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'post_image', <any>postImage, QueryParamStyle.Form, true);
|
|
235
|
+
|
|
236
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'post_content_after', <any>postContentAfter, QueryParamStyle.Form, true);
|
|
225
237
|
|
|
226
238
|
let localVarHeaders = this.defaultHeaders;
|
|
227
239
|
|
|
@@ -260,12 +272,12 @@ export class WordpressManagementService extends BaseService {
|
|
|
260
272
|
return this.httpClient.request<number>('post', `${basePath}${localVarPath}`, {
|
|
261
273
|
context: localVarHttpContext,
|
|
262
274
|
body: asset,
|
|
263
|
-
params: localVarQueryParameters,
|
|
275
|
+
params: localVarQueryParameters.toHttpParams(),
|
|
264
276
|
responseType: <any>responseType_,
|
|
265
277
|
...(withCredentials ? { withCredentials } : {}),
|
|
266
278
|
headers: localVarHeaders,
|
|
267
279
|
observe: observe,
|
|
268
|
-
transferCache: localVarTransferCache,
|
|
280
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
269
281
|
reportProgress: reportProgress
|
|
270
282
|
});
|
|
271
283
|
}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
/* tslint:disable:no-unused-variable member-ordering */
|
|
11
11
|
|
|
12
12
|
import { Inject, Injectable, Optional } from '@angular/core';
|
|
13
|
-
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent,
|
|
14
|
-
import { CustomHttpParameterCodec } from '../encoder';
|
|
13
|
+
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpContext } from '@angular/common/http';
|
|
15
14
|
import { Observable } from 'rxjs';
|
|
15
|
+
import { OpenApiHttpParams, QueryParamStyle } from '../query.params';
|
|
16
16
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import { AgravityErrorResponse } from '../model/agravityErrorResponse.agravity';
|
|
@@ -90,9 +90,11 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* This endpoint creates a unique workspace ID and adds the information to the database.
|
|
93
|
+
* @endpoint post /workspaces
|
|
93
94
|
* @param requestParameters
|
|
94
95
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
95
96
|
* @param reportProgress flag to report request and response progress.
|
|
97
|
+
* @param options additional options
|
|
96
98
|
*/
|
|
97
99
|
public httpWorkspacesCreate(
|
|
98
100
|
requestParameters: HttpWorkspacesCreateRequestParams,
|
|
@@ -125,8 +127,9 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
125
127
|
const translations = requestParameters?.translations;
|
|
126
128
|
const acceptLanguage = requestParameters?.acceptLanguage;
|
|
127
129
|
|
|
128
|
-
let localVarQueryParameters = new
|
|
129
|
-
|
|
130
|
+
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
131
|
+
|
|
132
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'translations', <any>translations, QueryParamStyle.Form, true);
|
|
130
133
|
|
|
131
134
|
let localVarHeaders = this.defaultHeaders;
|
|
132
135
|
if (acceptLanguage !== undefined && acceptLanguage !== null) {
|
|
@@ -168,20 +171,22 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
168
171
|
return this.httpClient.request<Workspace>('post', `${basePath}${localVarPath}`, {
|
|
169
172
|
context: localVarHttpContext,
|
|
170
173
|
body: workspace,
|
|
171
|
-
params: localVarQueryParameters,
|
|
174
|
+
params: localVarQueryParameters.toHttpParams(),
|
|
172
175
|
responseType: <any>responseType_,
|
|
173
176
|
...(withCredentials ? { withCredentials } : {}),
|
|
174
177
|
headers: localVarHeaders,
|
|
175
178
|
observe: observe,
|
|
176
|
-
transferCache: localVarTransferCache,
|
|
179
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
177
180
|
reportProgress: reportProgress
|
|
178
181
|
});
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
/**
|
|
182
185
|
* This endpoint deletes all workspaces on the system.
|
|
186
|
+
* @endpoint delete /workspaces
|
|
183
187
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
184
188
|
* @param reportProgress flag to report request and response progress.
|
|
189
|
+
* @param options additional options
|
|
185
190
|
*/
|
|
186
191
|
public httpWorkspacesDelete(observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: undefined; context?: HttpContext; transferCache?: boolean }): Observable<any>;
|
|
187
192
|
public httpWorkspacesDelete(
|
|
@@ -224,16 +229,18 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
224
229
|
...(withCredentials ? { withCredentials } : {}),
|
|
225
230
|
headers: localVarHeaders,
|
|
226
231
|
observe: observe,
|
|
227
|
-
transferCache: localVarTransferCache,
|
|
232
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
228
233
|
reportProgress: reportProgress
|
|
229
234
|
});
|
|
230
235
|
}
|
|
231
236
|
|
|
232
237
|
/**
|
|
233
238
|
* This endpoint deletes the workspace with the given ID.
|
|
239
|
+
* @endpoint delete /workspaces/{id}
|
|
234
240
|
* @param requestParameters
|
|
235
241
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
236
242
|
* @param reportProgress flag to report request and response progress.
|
|
243
|
+
* @param options additional options
|
|
237
244
|
*/
|
|
238
245
|
public httpWorkspacesDeleteById(
|
|
239
246
|
requestParameters: HttpWorkspacesDeleteByIdRequestParams,
|
|
@@ -297,16 +304,18 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
297
304
|
...(withCredentials ? { withCredentials } : {}),
|
|
298
305
|
headers: localVarHeaders,
|
|
299
306
|
observe: observe,
|
|
300
|
-
transferCache: localVarTransferCache,
|
|
307
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
301
308
|
reportProgress: reportProgress
|
|
302
309
|
});
|
|
303
310
|
}
|
|
304
311
|
|
|
305
312
|
/**
|
|
306
313
|
* This endpoint lists all available workspaces, which are stored in the database and not deleted (status \"A\").
|
|
314
|
+
* @endpoint get /workspaces
|
|
307
315
|
* @param requestParameters
|
|
308
316
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
309
317
|
* @param reportProgress flag to report request and response progress.
|
|
318
|
+
* @param options additional options
|
|
310
319
|
*/
|
|
311
320
|
public httpWorkspacesGet(
|
|
312
321
|
requestParameters?: HttpWorkspacesGetRequestParams,
|
|
@@ -335,8 +344,9 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
335
344
|
const translations = requestParameters?.translations;
|
|
336
345
|
const acceptLanguage = requestParameters?.acceptLanguage;
|
|
337
346
|
|
|
338
|
-
let localVarQueryParameters = new
|
|
339
|
-
|
|
347
|
+
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
348
|
+
|
|
349
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'translations', <any>translations, QueryParamStyle.Form, true);
|
|
340
350
|
|
|
341
351
|
let localVarHeaders = this.defaultHeaders;
|
|
342
352
|
if (acceptLanguage !== undefined && acceptLanguage !== null) {
|
|
@@ -370,21 +380,23 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
370
380
|
const { basePath, withCredentials } = this.configuration;
|
|
371
381
|
return this.httpClient.request<Array<Workspace>>('get', `${basePath}${localVarPath}`, {
|
|
372
382
|
context: localVarHttpContext,
|
|
373
|
-
params: localVarQueryParameters,
|
|
383
|
+
params: localVarQueryParameters.toHttpParams(),
|
|
374
384
|
responseType: <any>responseType_,
|
|
375
385
|
...(withCredentials ? { withCredentials } : {}),
|
|
376
386
|
headers: localVarHeaders,
|
|
377
387
|
observe: observe,
|
|
378
|
-
transferCache: localVarTransferCache,
|
|
388
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
379
389
|
reportProgress: reportProgress
|
|
380
390
|
});
|
|
381
391
|
}
|
|
382
392
|
|
|
383
393
|
/**
|
|
384
394
|
* This endpoint returns one single workspace (from ID).
|
|
395
|
+
* @endpoint get /workspaces/{id}
|
|
385
396
|
* @param requestParameters
|
|
386
397
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
387
398
|
* @param reportProgress flag to report request and response progress.
|
|
399
|
+
* @param options additional options
|
|
388
400
|
*/
|
|
389
401
|
public httpWorkspacesGetById(
|
|
390
402
|
requestParameters: HttpWorkspacesGetByIdRequestParams,
|
|
@@ -417,8 +429,9 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
417
429
|
const translations = requestParameters?.translations;
|
|
418
430
|
const acceptLanguage = requestParameters?.acceptLanguage;
|
|
419
431
|
|
|
420
|
-
let localVarQueryParameters = new
|
|
421
|
-
|
|
432
|
+
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
433
|
+
|
|
434
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'translations', <any>translations, QueryParamStyle.Form, true);
|
|
422
435
|
|
|
423
436
|
let localVarHeaders = this.defaultHeaders;
|
|
424
437
|
if (acceptLanguage !== undefined && acceptLanguage !== null) {
|
|
@@ -452,21 +465,23 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
452
465
|
const { basePath, withCredentials } = this.configuration;
|
|
453
466
|
return this.httpClient.request<Workspace>('get', `${basePath}${localVarPath}`, {
|
|
454
467
|
context: localVarHttpContext,
|
|
455
|
-
params: localVarQueryParameters,
|
|
468
|
+
params: localVarQueryParameters.toHttpParams(),
|
|
456
469
|
responseType: <any>responseType_,
|
|
457
470
|
...(withCredentials ? { withCredentials } : {}),
|
|
458
471
|
headers: localVarHeaders,
|
|
459
472
|
observe: observe,
|
|
460
|
-
transferCache: localVarTransferCache,
|
|
473
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
461
474
|
reportProgress: reportProgress
|
|
462
475
|
});
|
|
463
476
|
}
|
|
464
477
|
|
|
465
478
|
/**
|
|
466
479
|
* This endpoint updates the workspace. Null fields will be ignored. If \'items\' are set they are fully reset (like PUT).
|
|
480
|
+
* @endpoint post /workspaces/{id}
|
|
467
481
|
* @param requestParameters
|
|
468
482
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
469
483
|
* @param reportProgress flag to report request and response progress.
|
|
484
|
+
* @param options additional options
|
|
470
485
|
*/
|
|
471
486
|
public httpWorkspacesUpdateById(
|
|
472
487
|
requestParameters: HttpWorkspacesUpdateByIdRequestParams,
|
|
@@ -503,8 +518,9 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
503
518
|
const translations = requestParameters?.translations;
|
|
504
519
|
const acceptLanguage = requestParameters?.acceptLanguage;
|
|
505
520
|
|
|
506
|
-
let localVarQueryParameters = new
|
|
507
|
-
|
|
521
|
+
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
522
|
+
|
|
523
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'translations', <any>translations, QueryParamStyle.Form, true);
|
|
508
524
|
|
|
509
525
|
let localVarHeaders = this.defaultHeaders;
|
|
510
526
|
if (acceptLanguage !== undefined && acceptLanguage !== null) {
|
|
@@ -546,21 +562,23 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
546
562
|
return this.httpClient.request<Workspace>('post', `${basePath}${localVarPath}`, {
|
|
547
563
|
context: localVarHttpContext,
|
|
548
564
|
body: workspace,
|
|
549
|
-
params: localVarQueryParameters,
|
|
565
|
+
params: localVarQueryParameters.toHttpParams(),
|
|
550
566
|
responseType: <any>responseType_,
|
|
551
567
|
...(withCredentials ? { withCredentials } : {}),
|
|
552
568
|
headers: localVarHeaders,
|
|
553
569
|
observe: observe,
|
|
554
|
-
transferCache: localVarTransferCache,
|
|
570
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
555
571
|
reportProgress: reportProgress
|
|
556
572
|
});
|
|
557
573
|
}
|
|
558
574
|
|
|
559
575
|
/**
|
|
560
576
|
* This endpoint updates the permissions of the workspace. The modifier tells the system what to do with the list of ids.
|
|
577
|
+
* @endpoint post /workspaces/{id}/permissions
|
|
561
578
|
* @param requestParameters
|
|
562
579
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
563
580
|
* @param reportProgress flag to report request and response progress.
|
|
581
|
+
* @param options additional options
|
|
564
582
|
*/
|
|
565
583
|
public httpWorkspacesUpdatePermissionsById(
|
|
566
584
|
requestParameters: HttpWorkspacesUpdatePermissionsByIdRequestParams,
|
|
@@ -636,7 +654,7 @@ export class WorkspaceManagementService extends BaseService {
|
|
|
636
654
|
...(withCredentials ? { withCredentials } : {}),
|
|
637
655
|
headers: localVarHeaders,
|
|
638
656
|
observe: observe,
|
|
639
|
-
transferCache: localVarTransferCache,
|
|
657
|
+
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
640
658
|
reportProgress: reportProgress
|
|
641
659
|
});
|
|
642
660
|
}
|
package/api.base.service.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
|
|
11
11
|
import { CustomHttpParameterCodec } from './encoder';
|
|
12
12
|
import { AgravityConfiguration } from './configuration';
|
|
13
|
+
import { OpenApiHttpParams, QueryParamStyle, concatHttpParamsObject } from './query.params';
|
|
13
14
|
|
|
14
15
|
export class BaseService {
|
|
15
16
|
protected basePath = 'http://localhost:7071/api';
|
|
@@ -37,42 +38,55 @@ export class BaseService {
|
|
|
37
38
|
return consumes.indexOf('multipart/form-data') !== -1;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
protected addToHttpParams(httpParams:
|
|
41
|
-
// If the value is an object (but not a Date), recursively add its keys.
|
|
42
|
-
if (typeof value === 'object' && !(value instanceof Date)) {
|
|
43
|
-
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
|
|
44
|
-
}
|
|
45
|
-
return this.addToHttpParamsRecursive(httpParams, value, key);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
|
|
41
|
+
protected addToHttpParams(httpParams: OpenApiHttpParams, key: string, value: any | null | undefined, paramStyle: QueryParamStyle, explode: boolean): OpenApiHttpParams {
|
|
49
42
|
if (value === null || value === undefined) {
|
|
50
43
|
return httpParams;
|
|
51
44
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
|
|
45
|
+
|
|
46
|
+
if (paramStyle === QueryParamStyle.DeepObject) {
|
|
47
|
+
if (typeof value !== 'object') {
|
|
48
|
+
throw Error(`An object must be provided for key ${key} as it is a deep object`);
|
|
56
49
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
|
|
51
|
+
return Object.keys(value as Record<string, any>).reduce((hp, k) => hp.append(`${key}[${k}]`, value[k]), httpParams);
|
|
52
|
+
} else if (paramStyle === QueryParamStyle.Json) {
|
|
53
|
+
return httpParams.append(key, JSON.stringify(value));
|
|
54
|
+
} else {
|
|
55
|
+
// Form-style, SpaceDelimited or PipeDelimited
|
|
56
|
+
|
|
57
|
+
if (Object(value) !== value) {
|
|
58
|
+
// If it is a primitive type, add its string representation
|
|
59
|
+
return httpParams.append(key, value.toString());
|
|
60
60
|
} else if (value instanceof Date) {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
return httpParams.append(key, value.toISOString());
|
|
62
|
+
} else if (Array.isArray(value)) {
|
|
63
|
+
// Otherwise, if it's an array, add each element.
|
|
64
|
+
if (paramStyle === QueryParamStyle.Form) {
|
|
65
|
+
return httpParams.set(key, value, { explode: explode, delimiter: ',' });
|
|
66
|
+
} else if (paramStyle === QueryParamStyle.SpaceDelimited) {
|
|
67
|
+
return httpParams.set(key, value, { explode: explode, delimiter: ' ' });
|
|
63
68
|
} else {
|
|
64
|
-
|
|
69
|
+
// PipeDelimited
|
|
70
|
+
return httpParams.set(key, value, { explode: explode, delimiter: '|' });
|
|
65
71
|
}
|
|
66
72
|
} else {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
// Otherwise, if it's an object, add each field.
|
|
74
|
+
if (paramStyle === QueryParamStyle.Form) {
|
|
75
|
+
if (explode) {
|
|
76
|
+
Object.keys(value).forEach((k) => {
|
|
77
|
+
httpParams = this.addToHttpParams(httpParams, k, value[k], paramStyle, explode);
|
|
78
|
+
});
|
|
79
|
+
return httpParams;
|
|
80
|
+
} else {
|
|
81
|
+
return concatHttpParamsObject(httpParams, key, value, ',');
|
|
82
|
+
}
|
|
83
|
+
} else if (paramStyle === QueryParamStyle.SpaceDelimited) {
|
|
84
|
+
return concatHttpParamsObject(httpParams, key, value, ' ');
|
|
85
|
+
} else {
|
|
86
|
+
// PipeDelimited
|
|
87
|
+
return concatHttpParamsObject(httpParams, key, value, '|');
|
|
88
|
+
}
|
|
71
89
|
}
|
|
72
|
-
return httpParams;
|
|
73
|
-
} else if (key != null) {
|
|
74
|
-
return httpParams.append(key, value);
|
|
75
90
|
}
|
|
76
|
-
throw Error('key may not be null if value is not object or array');
|
|
77
91
|
}
|
|
78
92
|
}
|
package/configuration.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { HttpHeaders,
|
|
1
|
+
import { HttpHeaders, HttpParameterCodec } from '@angular/common/http';
|
|
2
2
|
import { Param } from './param';
|
|
3
|
+
import { OpenApiHttpParams } from './query.params';
|
|
3
4
|
|
|
4
5
|
export interface AgravityConfigurationParameters {
|
|
5
6
|
/**
|
|
@@ -162,7 +163,7 @@ export class AgravityConfiguration {
|
|
|
162
163
|
return value ? headers.set(headerName, (prefix ?? '') + value) : headers;
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
public addCredentialToQuery(credentialKey: string, paramName: string, query:
|
|
166
|
+
public addCredentialToQuery(credentialKey: string, paramName: string, query: OpenApiHttpParams): OpenApiHttpParams {
|
|
166
167
|
const value = this.lookupCredential(credentialKey);
|
|
167
168
|
return value ? query.set(paramName, value) : query;
|
|
168
169
|
}
|
package/encoder.ts
CHANGED
|
@@ -18,3 +18,18 @@ export class CustomHttpParameterCodec implements HttpParameterCodec {
|
|
|
18
18
|
return decodeURIComponent(v);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
export class IdentityHttpParameterCodec implements HttpParameterCodec {
|
|
23
|
+
encodeKey(k: string): string {
|
|
24
|
+
return k;
|
|
25
|
+
}
|
|
26
|
+
encodeValue(v: string): string {
|
|
27
|
+
return v;
|
|
28
|
+
}
|
|
29
|
+
decodeKey(k: string): string {
|
|
30
|
+
return k;
|
|
31
|
+
}
|
|
32
|
+
decodeValue(v: string): string {
|
|
33
|
+
return v;
|
|
34
|
+
}
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agravity/private",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "The Agravity GlobalDAM API which allowes authenticated user to access the Agravity GlobalDAM Backend",
|
|
5
5
|
"author": "Philipp Losbichler",
|
|
6
6
|
"repository": {
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
"build": "ng-packagr -p ng-package.json"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@angular/core": "^
|
|
26
|
+
"@angular/core": "^21.0.0",
|
|
27
27
|
"rxjs": "^7.4.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@angular/common": "^
|
|
31
|
-
"@angular/compiler": "^
|
|
32
|
-
"@angular/compiler-cli": "^
|
|
33
|
-
"@angular/core": "^
|
|
34
|
-
"@angular/platform-browser": "^
|
|
35
|
-
"ng-packagr": "^
|
|
30
|
+
"@angular/common": "^21.0.0",
|
|
31
|
+
"@angular/compiler": "^21.0.0",
|
|
32
|
+
"@angular/compiler-cli": "^21.0.0",
|
|
33
|
+
"@angular/core": "^21.0.0",
|
|
34
|
+
"@angular/platform-browser": "^21.0.0",
|
|
35
|
+
"ng-packagr": "^21.0.0",
|
|
36
36
|
"reflect-metadata": "^0.1.3",
|
|
37
37
|
"rxjs": "^7.4.0",
|
|
38
|
-
"typescript": ">=5.
|
|
38
|
+
"typescript": ">=5.9.0 <6.0.0",
|
|
39
39
|
"zone.js": "^0.15.0"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
package/query.params.ts
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { HttpParams, HttpParameterCodec } from '@angular/common/http';
|
|
2
|
+
import { CustomHttpParameterCodec, IdentityHttpParameterCodec } from './encoder';
|
|
3
|
+
|
|
4
|
+
export enum QueryParamStyle {
|
|
5
|
+
Json,
|
|
6
|
+
Form,
|
|
7
|
+
DeepObject,
|
|
8
|
+
SpaceDelimited,
|
|
9
|
+
PipeDelimited
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type Delimiter = ',' | ' ' | '|' | '\t';
|
|
13
|
+
|
|
14
|
+
export interface ParamOptions {
|
|
15
|
+
/** When true, serialized as multiple repeated key=value pairs. When false, serialized as a single key with joined values using `delimiter`. */
|
|
16
|
+
explode?: boolean;
|
|
17
|
+
/** Delimiter used when explode=false. The delimiter itself is inserted unencoded between encoded values. */
|
|
18
|
+
delimiter?: Delimiter;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ParamEntry {
|
|
22
|
+
values: string[];
|
|
23
|
+
options: Required<ParamOptions>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class OpenApiHttpParams {
|
|
27
|
+
private params: Map<string, ParamEntry> = new Map();
|
|
28
|
+
private defaults: Required<ParamOptions>;
|
|
29
|
+
private encoder: HttpParameterCodec;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @param encoder Parameter serializer
|
|
33
|
+
* @param defaults Global defaults used when a specific parameter has no explicit options.
|
|
34
|
+
* By OpenAPI default, explode is true for query params with style=form.
|
|
35
|
+
*/
|
|
36
|
+
constructor(encoder?: HttpParameterCodec, defaults?: { explode?: boolean; delimiter?: Delimiter }) {
|
|
37
|
+
this.encoder = encoder || new CustomHttpParameterCodec();
|
|
38
|
+
this.defaults = {
|
|
39
|
+
explode: defaults?.explode ?? true,
|
|
40
|
+
delimiter: defaults?.delimiter ?? ','
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
private resolveOptions(local?: ParamOptions): Required<ParamOptions> {
|
|
45
|
+
return {
|
|
46
|
+
explode: local?.explode ?? this.defaults.explode,
|
|
47
|
+
delimiter: local?.delimiter ?? this.defaults.delimiter
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Replace the parameter's values and (optionally) its options.
|
|
53
|
+
* Options are stored per-parameter (not global).
|
|
54
|
+
*/
|
|
55
|
+
set(key: string, values: string[] | string, options?: ParamOptions): this {
|
|
56
|
+
const arr = Array.isArray(values) ? values.slice() : [values];
|
|
57
|
+
const opts = this.resolveOptions(options);
|
|
58
|
+
this.params.set(key, { values: arr, options: opts });
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Append a single value to the parameter. If the parameter didn't exist it will be created
|
|
64
|
+
* and use resolved options (global defaults merged with any provided options).
|
|
65
|
+
*/
|
|
66
|
+
append(key: string, value: string, options?: ParamOptions): this {
|
|
67
|
+
const entry = this.params.get(key);
|
|
68
|
+
if (entry) {
|
|
69
|
+
// If new options provided, override the stored options for subsequent serialization
|
|
70
|
+
if (options) {
|
|
71
|
+
entry.options = this.resolveOptions({ ...entry.options, ...options });
|
|
72
|
+
}
|
|
73
|
+
entry.values.push(value);
|
|
74
|
+
} else {
|
|
75
|
+
this.set(key, [value], options);
|
|
76
|
+
}
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Serialize to a query string according to per-parameter OpenAPI options.
|
|
82
|
+
* - If explode=true for that parameter → repeated key=value pairs (each value encoded).
|
|
83
|
+
* - If explode=false for that parameter → single key=value where values are individually encoded
|
|
84
|
+
* and joined using the configured delimiter. The delimiter character is inserted AS-IS
|
|
85
|
+
* (not percent-encoded).
|
|
86
|
+
*/
|
|
87
|
+
toString(): string {
|
|
88
|
+
const records = this.toRecord();
|
|
89
|
+
const parts: string[] = [];
|
|
90
|
+
|
|
91
|
+
for (const key in records) {
|
|
92
|
+
parts.push(`${key}=${records[key]}`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return parts.join('&');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Return parameters as a plain record.
|
|
100
|
+
* - If a parameter has exactly one value, returns that value directly.
|
|
101
|
+
* - If a parameter has multiple values, returns a readonly array of values.
|
|
102
|
+
*/
|
|
103
|
+
toRecord(): Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>> {
|
|
104
|
+
const parts: Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>> = {};
|
|
105
|
+
|
|
106
|
+
for (const [key, entry] of this.params.entries()) {
|
|
107
|
+
const encodedKey = this.encoder.encodeKey(key);
|
|
108
|
+
|
|
109
|
+
if (entry.options.explode) {
|
|
110
|
+
parts[encodedKey] = entry.values.map((v) => this.encoder.encodeValue(v));
|
|
111
|
+
} else {
|
|
112
|
+
const encodedValues = entry.values.map((v) => this.encoder.encodeValue(v));
|
|
113
|
+
|
|
114
|
+
// join with the delimiter *unencoded*
|
|
115
|
+
parts[encodedKey] = encodedValues.join(entry.options.delimiter);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return parts;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Return an Angular's HttpParams with an identity parameter codec as the parameters are already encoded.
|
|
124
|
+
*/
|
|
125
|
+
toHttpParams(): HttpParams {
|
|
126
|
+
const records = this.toRecord();
|
|
127
|
+
|
|
128
|
+
let httpParams = new HttpParams({ encoder: new IdentityHttpParameterCodec() });
|
|
129
|
+
|
|
130
|
+
return httpParams.appendAll(records);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function concatHttpParamsObject(
|
|
135
|
+
httpParams: OpenApiHttpParams,
|
|
136
|
+
key: string,
|
|
137
|
+
item: {
|
|
138
|
+
[index: string]: any;
|
|
139
|
+
},
|
|
140
|
+
delimiter: Delimiter
|
|
141
|
+
): OpenApiHttpParams {
|
|
142
|
+
let keyAndValues: string[] = [];
|
|
143
|
+
|
|
144
|
+
for (const k in item) {
|
|
145
|
+
keyAndValues.push(k);
|
|
146
|
+
|
|
147
|
+
const value = item[k];
|
|
148
|
+
|
|
149
|
+
if (Array.isArray(value)) {
|
|
150
|
+
keyAndValues.push(...value.map(convertToString));
|
|
151
|
+
} else {
|
|
152
|
+
keyAndValues.push(convertToString(value));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return httpParams.set(key, keyAndValues, { explode: false, delimiter: delimiter });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function convertToString(value: any): string {
|
|
160
|
+
if (value instanceof Date) {
|
|
161
|
+
return value.toISOString();
|
|
162
|
+
} else {
|
|
163
|
+
return value.toString();
|
|
164
|
+
}
|
|
165
|
+
}
|