@agravity/public 5.2.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 (78) hide show
  1. package/.openapi-generator/FILES +76 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +203 -0
  5. package/api/api.ts +43 -0
  6. package/api/publicAssetManagement.pub.agravity.ts +504 -0
  7. package/api/publicAssetOperations.pub.agravity.ts +633 -0
  8. package/api/publicAssetPublishing.pub.agravity.ts +263 -0
  9. package/api/publicAssetVersioning.pub.agravity.ts +552 -0
  10. package/api/publicAuthenticationManagement.pub.agravity.ts +135 -0
  11. package/api/publicCollectionManagement.pub.agravity.ts +562 -0
  12. package/api/publicCollectionSecureUpload.pub.agravity.ts +229 -0
  13. package/api/publicCollectionTypeManagement.pub.agravity.ts +266 -0
  14. package/api/publicConfigurationManagement.pub.agravity.ts +128 -0
  15. package/api/publicDownloadFormatManagement.pub.agravity.ts +135 -0
  16. package/api/publicGeneralManagement.pub.agravity.ts +221 -0
  17. package/api/publicHelperTools.pub.agravity.ts +288 -0
  18. package/api/publicPublishing.pub.agravity.ts +148 -0
  19. package/api/publicSavedSearch.pub.agravity.ts +148 -0
  20. package/api/publicSearchManagement.pub.agravity.ts +197 -0
  21. package/api/publicSharingManagement.pub.agravity.ts +215 -0
  22. package/api/publicSignalRConnectionManagement.pub.agravity.ts +136 -0
  23. package/api/publicStaticDefinedListManagement.pub.agravity.ts +203 -0
  24. package/api/publicTranslationManagement.pub.agravity.ts +267 -0
  25. package/api/publicWebAppData.pub.agravity.ts +193 -0
  26. package/api/publicWorkspaceManagement.pub.agravity.ts +204 -0
  27. package/api.module.ts +51 -0
  28. package/configuration.ts +132 -0
  29. package/encoder.ts +20 -0
  30. package/git_push.sh +58 -0
  31. package/index.ts +5 -0
  32. package/model/agravityErrorResponse.pub.agravity.ts +19 -0
  33. package/model/agravityVersion.pub.agravity.ts +24 -0
  34. package/model/allWebAppData.pub.agravity.ts +24 -0
  35. package/model/artificialIntelligenceGroup.pub.agravity.ts +20 -0
  36. package/model/asset.pub.agravity.ts +47 -0
  37. package/model/assetAvailability.pub.agravity.ts +19 -0
  38. package/model/assetBlob.pub.agravity.ts +82 -0
  39. package/model/assetIdContainer.pub.agravity.ts +18 -0
  40. package/model/assetPageResult.pub.agravity.ts +23 -0
  41. package/model/azSearchOptions.pub.agravity.ts +25 -0
  42. package/model/badRequestResult.pub.agravity.ts +17 -0
  43. package/model/collTypeItem.pub.agravity.ts +38 -0
  44. package/model/collection.pub.agravity.ts +35 -0
  45. package/model/collectionType.pub.agravity.ts +35 -0
  46. package/model/collectionUDL.pub.agravity.ts +21 -0
  47. package/model/createSftpUserResult.pub.agravity.ts +18 -0
  48. package/model/dataResult.pub.agravity.ts +22 -0
  49. package/model/distZipResponse.pub.agravity.ts +19 -0
  50. package/model/downloadFormat.pub.agravity.ts +34 -0
  51. package/model/dynamicImageOperation.pub.agravity.ts +18 -0
  52. package/model/entityId.pub.agravity.ts +17 -0
  53. package/model/entityIdName.pub.agravity.ts +19 -0
  54. package/model/frontendAppConfig.pub.agravity.ts +21 -0
  55. package/model/groupAllAppData.pub.agravity.ts +26 -0
  56. package/model/metadata.pub.agravity.ts +19 -0
  57. package/model/models.ts +44 -0
  58. package/model/okResult.pub.agravity.ts +17 -0
  59. package/model/publishEntity.pub.agravity.ts +28 -0
  60. package/model/publishedAsset.pub.agravity.ts +25 -0
  61. package/model/quickShareFull.pub.agravity.ts +36 -0
  62. package/model/sasToken.pub.agravity.ts +22 -0
  63. package/model/savedSearch.pub.agravity.ts +31 -0
  64. package/model/searchFacet.pub.agravity.ts +19 -0
  65. package/model/searchFacetEntity.pub.agravity.ts +19 -0
  66. package/model/searchResult.pub.agravity.ts +23 -0
  67. package/model/searchableItem.pub.agravity.ts +26 -0
  68. package/model/secureUploadEntity.pub.agravity.ts +27 -0
  69. package/model/sharedAsset.pub.agravity.ts +25 -0
  70. package/model/sharedCollectionFull.pub.agravity.ts +29 -0
  71. package/model/signalRConnectionInfo.pub.agravity.ts +18 -0
  72. package/model/staticDefinedList.pub.agravity.ts +30 -0
  73. package/model/versionEntity.pub.agravity.ts +28 -0
  74. package/model/versionedAsset.pub.agravity.ts +20 -0
  75. package/model/whereParam.pub.agravity.ts +43 -0
  76. package/model/workspace.pub.agravity.ts +34 -0
  77. package/package.json +28 -0
  78. package/variables.ts +9 -0
@@ -0,0 +1,562 @@
1
+ /**
2
+ * Agravity OpenAPI Documentation - Public Functions
3
+ * <h1>Agravity API Reference</h1>This is the public API description of Agravity GmbH.<br/><h2>Resources</h2><ul> <li>Collection type management</li> <li>Collections management</li> <li>Assets management</li> <li>Assets operations</li> <li>Assets publishing</li> <li>Collection Sharing (consume share)</li> <li>Secure Upload (validate + upload file)</li> <li>Download ZIP</li> <li>Search</li> <li>General management</li></ul><h2> Operations</h2>Agravity API performs the following operations:<ul> <li>List / get single collection types</li> <li>List / get single collections</li> <li>List / get single assets</li> <li>Operations on assets like: blobs, rotate, resize, similar, collections, customfields, download</li> <li>List / get single published asset</li> <li>Search for assets or collections</li> <li>Get version of deployment</li></ul><br/><b>API key is needed to access these endpoints.</b><br/><br/>Copyright © Agravity GmbH 2023. All Rights Reserved
4
+ *
5
+ * The version of the OpenAPI document: 5.2.0
6
+ * Contact: office@agravity.io
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /* tslint:disable:no-unused-variable member-ordering */
13
+
14
+ import { Inject, Injectable, Optional } from '@angular/core';
15
+ import { HttpClient, HttpHeaders, HttpParams,
16
+ HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
17
+ import { CustomHttpParameterCodec } from '../encoder';
18
+ import { Observable } from 'rxjs';
19
+
20
+ import { AgravityErrorResponse } from '../model/models';
21
+ import { Collection } from '../model/models';
22
+
23
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
24
+ import { AgravityPublicConfiguration } from '../configuration';
25
+
26
+
27
+
28
+ @Injectable({
29
+ providedIn: 'root'
30
+ })
31
+ export class PublicCollectionManagementService {
32
+
33
+ protected basePath = 'http://localhost:7072/api';
34
+ public defaultHeaders = new HttpHeaders();
35
+ public configuration = new AgravityPublicConfiguration();
36
+ public encoder: HttpParameterCodec;
37
+
38
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
39
+ if (configuration) {
40
+ this.configuration = configuration;
41
+ }
42
+ if (typeof this.configuration.basePath !== 'string') {
43
+ if (typeof basePath !== 'string') {
44
+ basePath = this.basePath;
45
+ }
46
+ this.configuration.basePath = basePath;
47
+ }
48
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
49
+ }
50
+
51
+
52
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
53
+ if (typeof value === "object" && value instanceof Date === false) {
54
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
55
+ } else {
56
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
57
+ }
58
+ return httpParams;
59
+ }
60
+
61
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
62
+ if (value == null) {
63
+ return httpParams;
64
+ }
65
+
66
+ if (typeof value === "object") {
67
+ if (Array.isArray(value)) {
68
+ (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
69
+ } else if (value instanceof Date) {
70
+ if (key != null) {
71
+ httpParams = httpParams.append(key,
72
+ (value as Date).toISOString().substr(0, 10));
73
+ } else {
74
+ throw Error("key may not be null if value is Date");
75
+ }
76
+ } else {
77
+ Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
78
+ httpParams, value[k], key != null ? `${key}.${k}` : k));
79
+ }
80
+ } else if (key != null) {
81
+ httpParams = httpParams.append(key, value);
82
+ } else {
83
+ throw Error("key may not be null if value is not object or array");
84
+ }
85
+ return httpParams;
86
+ }
87
+
88
+ /**
89
+ * This endpoint creates a unique collection ID and adds the information to the database.
90
+ * @param collectiontypeid The ID of the collection type where this collections should be assigned.
91
+ * @param collection This endpoint creates a unique collection ID and adds the information to the database.
92
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
93
+ * @param reportProgress flag to report request and response progress.
94
+ */
95
+ public httpCollectionsCreate(collectiontypeid: string, collection: Collection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Collection>;
96
+ public httpCollectionsCreate(collectiontypeid: string, collection: Collection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Collection>>;
97
+ public httpCollectionsCreate(collectiontypeid: string, collection: Collection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Collection>>;
98
+ public httpCollectionsCreate(collectiontypeid: string, collection: Collection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
99
+ if (collectiontypeid === null || collectiontypeid === undefined) {
100
+ throw new Error('Required parameter collectiontypeid was null or undefined when calling httpCollectionsCreate.');
101
+ }
102
+ if (collection === null || collection === undefined) {
103
+ throw new Error('Required parameter collection was null or undefined when calling httpCollectionsCreate.');
104
+ }
105
+
106
+ let queryParameters = new HttpParams({encoder: this.encoder});
107
+ if (collectiontypeid !== undefined && collectiontypeid !== null) {
108
+ queryParameters = this.addToHttpParams(queryParameters,
109
+ <any>collectiontypeid, 'collectiontypeid');
110
+ }
111
+
112
+ let headers = this.defaultHeaders;
113
+
114
+ let credential: string | undefined;
115
+ // authentication (function_key) required
116
+ credential = this.configuration.lookupCredential('function_key');
117
+ if (credential) {
118
+ headers = headers.set('x-functions-key', credential);
119
+ }
120
+
121
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
122
+ if (httpHeaderAcceptSelected === undefined) {
123
+ // to determine the Accept header
124
+ const httpHeaderAccepts: string[] = [
125
+ 'application/json'
126
+ ];
127
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
128
+ }
129
+ if (httpHeaderAcceptSelected !== undefined) {
130
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
131
+ }
132
+
133
+
134
+ // to determine the Content-Type header
135
+ const consumes: string[] = [
136
+ 'application/json'
137
+ ];
138
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
139
+ if (httpContentTypeSelected !== undefined) {
140
+ headers = headers.set('Content-Type', httpContentTypeSelected);
141
+ }
142
+
143
+ let responseType_: 'text' | 'json' = 'json';
144
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
145
+ responseType_ = 'text';
146
+ }
147
+
148
+ return this.httpClient.post<Collection>(`${this.configuration.basePath}/collections`,
149
+ collection,
150
+ {
151
+ params: queryParameters,
152
+ responseType: <any>responseType_,
153
+ withCredentials: this.configuration.withCredentials,
154
+ headers: headers,
155
+ observe: observe,
156
+ reportProgress: reportProgress
157
+ }
158
+ );
159
+ }
160
+
161
+ /**
162
+ * This lists all the collections which are stored in the database and not deleted (status \&quot;A\&quot;). This will include all specific properties from collection type.
163
+ * @param collectiontypeid The ID of the collection type where these collections should come from.
164
+ * @param level The hierarchy level of collections which should be returned.
165
+ * @param parentid The ID of the parent collection which should be queried. (No collectiontypeid is required)
166
+ * @param fields This limits the fields which are returned, separated by comma (\&#39;,\&#39;).
167
+ * @param items The items can be extended to fully filled items.
168
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
169
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
170
+ * @param reportProgress flag to report request and response progress.
171
+ */
172
+ public httpCollectionsGet(collectiontypeid: string, level?: number, parentid?: string, fields?: string, items?: boolean, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<Collection>>;
173
+ public httpCollectionsGet(collectiontypeid: string, level?: number, parentid?: string, fields?: string, items?: boolean, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<Collection>>>;
174
+ public httpCollectionsGet(collectiontypeid: string, level?: number, parentid?: string, fields?: string, items?: boolean, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<Collection>>>;
175
+ public httpCollectionsGet(collectiontypeid: string, level?: number, parentid?: string, fields?: string, items?: boolean, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
176
+ if (collectiontypeid === null || collectiontypeid === undefined) {
177
+ throw new Error('Required parameter collectiontypeid was null or undefined when calling httpCollectionsGet.');
178
+ }
179
+
180
+ let queryParameters = new HttpParams({encoder: this.encoder});
181
+ if (collectiontypeid !== undefined && collectiontypeid !== null) {
182
+ queryParameters = this.addToHttpParams(queryParameters,
183
+ <any>collectiontypeid, 'collectiontypeid');
184
+ }
185
+ if (level !== undefined && level !== null) {
186
+ queryParameters = this.addToHttpParams(queryParameters,
187
+ <any>level, 'level');
188
+ }
189
+ if (parentid !== undefined && parentid !== null) {
190
+ queryParameters = this.addToHttpParams(queryParameters,
191
+ <any>parentid, 'parentid');
192
+ }
193
+ if (fields !== undefined && fields !== null) {
194
+ queryParameters = this.addToHttpParams(queryParameters,
195
+ <any>fields, 'fields');
196
+ }
197
+ if (items !== undefined && items !== null) {
198
+ queryParameters = this.addToHttpParams(queryParameters,
199
+ <any>items, 'items');
200
+ }
201
+ if (translations !== undefined && translations !== null) {
202
+ queryParameters = this.addToHttpParams(queryParameters,
203
+ <any>translations, 'translations');
204
+ }
205
+
206
+ let headers = this.defaultHeaders;
207
+
208
+ let credential: string | undefined;
209
+ // authentication (function_key) required
210
+ credential = this.configuration.lookupCredential('function_key');
211
+ if (credential) {
212
+ headers = headers.set('x-functions-key', credential);
213
+ }
214
+
215
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
216
+ if (httpHeaderAcceptSelected === undefined) {
217
+ // to determine the Accept header
218
+ const httpHeaderAccepts: string[] = [
219
+ 'application/json'
220
+ ];
221
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
222
+ }
223
+ if (httpHeaderAcceptSelected !== undefined) {
224
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
225
+ }
226
+
227
+
228
+ let responseType_: 'text' | 'json' = 'json';
229
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
230
+ responseType_ = 'text';
231
+ }
232
+
233
+ return this.httpClient.get<Array<Collection>>(`${this.configuration.basePath}/collections`,
234
+ {
235
+ params: queryParameters,
236
+ responseType: <any>responseType_,
237
+ withCredentials: this.configuration.withCredentials,
238
+ headers: headers,
239
+ observe: observe,
240
+ reportProgress: reportProgress
241
+ }
242
+ );
243
+ }
244
+
245
+ /**
246
+ * Returns one single collection (from ID). This will include all specific properties from collection type.
247
+ * @param id The ID of the collection.
248
+ * @param fields This limits the fields which are returned, separated by comma (\&#39;,\&#39;).
249
+ * @param items The items can be extended to fully filled items.
250
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
251
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
252
+ * @param reportProgress flag to report request and response progress.
253
+ */
254
+ public httpCollectionsGetById(id: string, fields?: string, items?: boolean, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Collection>;
255
+ public httpCollectionsGetById(id: string, fields?: string, items?: boolean, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Collection>>;
256
+ public httpCollectionsGetById(id: string, fields?: string, items?: boolean, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Collection>>;
257
+ public httpCollectionsGetById(id: string, fields?: string, items?: boolean, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
258
+ if (id === null || id === undefined) {
259
+ throw new Error('Required parameter id was null or undefined when calling httpCollectionsGetById.');
260
+ }
261
+
262
+ let queryParameters = new HttpParams({encoder: this.encoder});
263
+ if (fields !== undefined && fields !== null) {
264
+ queryParameters = this.addToHttpParams(queryParameters,
265
+ <any>fields, 'fields');
266
+ }
267
+ if (items !== undefined && items !== null) {
268
+ queryParameters = this.addToHttpParams(queryParameters,
269
+ <any>items, 'items');
270
+ }
271
+ if (translations !== undefined && translations !== null) {
272
+ queryParameters = this.addToHttpParams(queryParameters,
273
+ <any>translations, 'translations');
274
+ }
275
+
276
+ let headers = this.defaultHeaders;
277
+
278
+ let credential: string | undefined;
279
+ // authentication (function_key) required
280
+ credential = this.configuration.lookupCredential('function_key');
281
+ if (credential) {
282
+ headers = headers.set('x-functions-key', credential);
283
+ }
284
+
285
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
286
+ if (httpHeaderAcceptSelected === undefined) {
287
+ // to determine the Accept header
288
+ const httpHeaderAccepts: string[] = [
289
+ 'application/json'
290
+ ];
291
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
292
+ }
293
+ if (httpHeaderAcceptSelected !== undefined) {
294
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
295
+ }
296
+
297
+
298
+ let responseType_: 'text' | 'json' = 'json';
299
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
300
+ responseType_ = 'text';
301
+ }
302
+
303
+ return this.httpClient.get<Collection>(`${this.configuration.basePath}/collections/${encodeURIComponent(String(id))}`,
304
+ {
305
+ params: queryParameters,
306
+ responseType: <any>responseType_,
307
+ withCredentials: this.configuration.withCredentials,
308
+ headers: headers,
309
+ observe: observe,
310
+ reportProgress: reportProgress
311
+ }
312
+ );
313
+ }
314
+
315
+ /**
316
+ * Get the complete tree of descendants from a single collection.
317
+ * @param id The ID of the collection.
318
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
319
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
320
+ * @param reportProgress flag to report request and response progress.
321
+ */
322
+ public httpCollectionsGetDescendantsTreeOfId(id: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<Collection>>;
323
+ public httpCollectionsGetDescendantsTreeOfId(id: string, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<Collection>>>;
324
+ public httpCollectionsGetDescendantsTreeOfId(id: string, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<Collection>>>;
325
+ public httpCollectionsGetDescendantsTreeOfId(id: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
326
+ if (id === null || id === undefined) {
327
+ throw new Error('Required parameter id was null or undefined when calling httpCollectionsGetDescendantsTreeOfId.');
328
+ }
329
+
330
+ let queryParameters = new HttpParams({encoder: this.encoder});
331
+ if (translations !== undefined && translations !== null) {
332
+ queryParameters = this.addToHttpParams(queryParameters,
333
+ <any>translations, 'translations');
334
+ }
335
+
336
+ let headers = this.defaultHeaders;
337
+
338
+ let credential: string | undefined;
339
+ // authentication (function_key) required
340
+ credential = this.configuration.lookupCredential('function_key');
341
+ if (credential) {
342
+ headers = headers.set('x-functions-key', credential);
343
+ }
344
+
345
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
346
+ if (httpHeaderAcceptSelected === undefined) {
347
+ // to determine the Accept header
348
+ const httpHeaderAccepts: string[] = [
349
+ 'application/json'
350
+ ];
351
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
352
+ }
353
+ if (httpHeaderAcceptSelected !== undefined) {
354
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
355
+ }
356
+
357
+
358
+ let responseType_: 'text' | 'json' = 'json';
359
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
360
+ responseType_ = 'text';
361
+ }
362
+
363
+ return this.httpClient.get<Array<Collection>>(`${this.configuration.basePath}/collections/${encodeURIComponent(String(id))}/descendants`,
364
+ {
365
+ params: queryParameters,
366
+ responseType: <any>responseType_,
367
+ withCredentials: this.configuration.withCredentials,
368
+ headers: headers,
369
+ observe: observe,
370
+ reportProgress: reportProgress
371
+ }
372
+ );
373
+ }
374
+
375
+ /**
376
+ * Get the complete tree of ancestors from a single collection.
377
+ * @param id The ID of the collection.
378
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
379
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
380
+ * @param reportProgress flag to report request and response progress.
381
+ */
382
+ public httpCollectionsGetTreeAncestorsOfId(id: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<Collection>>;
383
+ public httpCollectionsGetTreeAncestorsOfId(id: string, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<Collection>>>;
384
+ public httpCollectionsGetTreeAncestorsOfId(id: string, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<Collection>>>;
385
+ public httpCollectionsGetTreeAncestorsOfId(id: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
386
+ if (id === null || id === undefined) {
387
+ throw new Error('Required parameter id was null or undefined when calling httpCollectionsGetTreeAncestorsOfId.');
388
+ }
389
+
390
+ let queryParameters = new HttpParams({encoder: this.encoder});
391
+ if (translations !== undefined && translations !== null) {
392
+ queryParameters = this.addToHttpParams(queryParameters,
393
+ <any>translations, 'translations');
394
+ }
395
+
396
+ let headers = this.defaultHeaders;
397
+
398
+ let credential: string | undefined;
399
+ // authentication (function_key) required
400
+ credential = this.configuration.lookupCredential('function_key');
401
+ if (credential) {
402
+ headers = headers.set('x-functions-key', credential);
403
+ }
404
+
405
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
406
+ if (httpHeaderAcceptSelected === undefined) {
407
+ // to determine the Accept header
408
+ const httpHeaderAccepts: string[] = [
409
+ 'application/json'
410
+ ];
411
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
412
+ }
413
+ if (httpHeaderAcceptSelected !== undefined) {
414
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
415
+ }
416
+
417
+
418
+ let responseType_: 'text' | 'json' = 'json';
419
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
420
+ responseType_ = 'text';
421
+ }
422
+
423
+ return this.httpClient.get<Array<Collection>>(`${this.configuration.basePath}/collections/${encodeURIComponent(String(id))}/ancestors`,
424
+ {
425
+ params: queryParameters,
426
+ responseType: <any>responseType_,
427
+ withCredentials: this.configuration.withCredentials,
428
+ headers: headers,
429
+ observe: observe,
430
+ reportProgress: reportProgress
431
+ }
432
+ );
433
+ }
434
+
435
+ /**
436
+ * This endpoint returns a generated thumbnail as a preview of the containing assets.
437
+ * @param id The ID of the collection.
438
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
439
+ * @param reportProgress flag to report request and response progress.
440
+ */
441
+ public httpGetCollectionPreviewsById(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/png' | 'application/json'}): Observable<string>;
442
+ public httpGetCollectionPreviewsById(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/png' | 'application/json'}): Observable<HttpResponse<string>>;
443
+ public httpGetCollectionPreviewsById(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/png' | 'application/json'}): Observable<HttpEvent<string>>;
444
+ public httpGetCollectionPreviewsById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'image/png' | 'application/json'}): Observable<any> {
445
+ if (id === null || id === undefined) {
446
+ throw new Error('Required parameter id was null or undefined when calling httpGetCollectionPreviewsById.');
447
+ }
448
+
449
+ let headers = this.defaultHeaders;
450
+
451
+ let credential: string | undefined;
452
+ // authentication (function_key) required
453
+ credential = this.configuration.lookupCredential('function_key');
454
+ if (credential) {
455
+ headers = headers.set('x-functions-key', credential);
456
+ }
457
+
458
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
459
+ if (httpHeaderAcceptSelected === undefined) {
460
+ // to determine the Accept header
461
+ const httpHeaderAccepts: string[] = [
462
+ 'image/png',
463
+ 'application/json'
464
+ ];
465
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
466
+ }
467
+ if (httpHeaderAcceptSelected !== undefined) {
468
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
469
+ }
470
+
471
+
472
+ let responseType_: 'text' | 'json' = 'json';
473
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
474
+ responseType_ = 'text';
475
+ }
476
+
477
+ return this.httpClient.get<string>(`${this.configuration.basePath}/collections/${encodeURIComponent(String(id))}/previews`,
478
+ {
479
+ responseType: <any>responseType_,
480
+ withCredentials: this.configuration.withCredentials,
481
+ headers: headers,
482
+ observe: observe,
483
+ reportProgress: reportProgress
484
+ }
485
+ );
486
+ }
487
+
488
+ /**
489
+ * This endpoint updates the collection. Specific properties could be updated.
490
+ * @param id The ID of the collection.
491
+ * @param collection The body has to be a valid collection json.Not fitting properties are ignored.
492
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
493
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
494
+ * @param reportProgress flag to report request and response progress.
495
+ */
496
+ public httpPublicCollectionsUpdateById(id: string, collection: Collection, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Collection>;
497
+ public httpPublicCollectionsUpdateById(id: string, collection: Collection, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Collection>>;
498
+ public httpPublicCollectionsUpdateById(id: string, collection: Collection, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Collection>>;
499
+ public httpPublicCollectionsUpdateById(id: string, collection: Collection, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
500
+ if (id === null || id === undefined) {
501
+ throw new Error('Required parameter id was null or undefined when calling httpPublicCollectionsUpdateById.');
502
+ }
503
+ if (collection === null || collection === undefined) {
504
+ throw new Error('Required parameter collection was null or undefined when calling httpPublicCollectionsUpdateById.');
505
+ }
506
+
507
+ let queryParameters = new HttpParams({encoder: this.encoder});
508
+ if (translations !== undefined && translations !== null) {
509
+ queryParameters = this.addToHttpParams(queryParameters,
510
+ <any>translations, 'translations');
511
+ }
512
+
513
+ let headers = this.defaultHeaders;
514
+
515
+ let credential: string | undefined;
516
+ // authentication (function_key) required
517
+ credential = this.configuration.lookupCredential('function_key');
518
+ if (credential) {
519
+ headers = headers.set('x-functions-key', credential);
520
+ }
521
+
522
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
523
+ if (httpHeaderAcceptSelected === undefined) {
524
+ // to determine the Accept header
525
+ const httpHeaderAccepts: string[] = [
526
+ 'application/json'
527
+ ];
528
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
529
+ }
530
+ if (httpHeaderAcceptSelected !== undefined) {
531
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
532
+ }
533
+
534
+
535
+ // to determine the Content-Type header
536
+ const consumes: string[] = [
537
+ 'application/json'
538
+ ];
539
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
540
+ if (httpContentTypeSelected !== undefined) {
541
+ headers = headers.set('Content-Type', httpContentTypeSelected);
542
+ }
543
+
544
+ let responseType_: 'text' | 'json' = 'json';
545
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
546
+ responseType_ = 'text';
547
+ }
548
+
549
+ return this.httpClient.post<Collection>(`${this.configuration.basePath}/collections/${encodeURIComponent(String(id))}`,
550
+ collection,
551
+ {
552
+ params: queryParameters,
553
+ responseType: <any>responseType_,
554
+ withCredentials: this.configuration.withCredentials,
555
+ headers: headers,
556
+ observe: observe,
557
+ reportProgress: reportProgress
558
+ }
559
+ );
560
+ }
561
+
562
+ }