@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,504 @@
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 { Asset } from '../model/models';
22
+ import { AssetPageResult } from '../model/models';
23
+
24
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
25
+ import { AgravityPublicConfiguration } from '../configuration';
26
+
27
+
28
+
29
+ @Injectable({
30
+ providedIn: 'root'
31
+ })
32
+ export class PublicAssetManagementService {
33
+
34
+ protected basePath = 'http://localhost:7072/api';
35
+ public defaultHeaders = new HttpHeaders();
36
+ public configuration = new AgravityPublicConfiguration();
37
+ public encoder: HttpParameterCodec;
38
+
39
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
40
+ if (configuration) {
41
+ this.configuration = configuration;
42
+ }
43
+ if (typeof this.configuration.basePath !== 'string') {
44
+ if (typeof basePath !== 'string') {
45
+ basePath = this.basePath;
46
+ }
47
+ this.configuration.basePath = basePath;
48
+ }
49
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
50
+ }
51
+
52
+ /**
53
+ * @param consumes string[] mime-types
54
+ * @return true: consumes contains 'multipart/form-data', false: otherwise
55
+ */
56
+ private canConsumeForm(consumes: string[]): boolean {
57
+ const form = 'multipart/form-data';
58
+ for (const consume of consumes) {
59
+ if (form === consume) {
60
+ return true;
61
+ }
62
+ }
63
+ return false;
64
+ }
65
+
66
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
67
+ if (typeof value === "object" && value instanceof Date === false) {
68
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
69
+ } else {
70
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
71
+ }
72
+ return httpParams;
73
+ }
74
+
75
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
76
+ if (value == null) {
77
+ return httpParams;
78
+ }
79
+
80
+ if (typeof value === "object") {
81
+ if (Array.isArray(value)) {
82
+ (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
83
+ } else if (value instanceof Date) {
84
+ if (key != null) {
85
+ httpParams = httpParams.append(key,
86
+ (value as Date).toISOString().substr(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(
92
+ httpParams, value[k], key != null ? `${key}.${k}` : k));
93
+ }
94
+ } else if (key != null) {
95
+ httpParams = httpParams.append(key, value);
96
+ } else {
97
+ throw Error("key may not be null if value is not object or array");
98
+ }
99
+ return httpParams;
100
+ }
101
+
102
+ /**
103
+ * @param name
104
+ * @param collectionId
105
+ * @param file
106
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
107
+ * @param reportProgress flag to report request and response progress.
108
+ */
109
+ public httpAssetUploadFile(name?: string, collectionId?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Asset>;
110
+ public httpAssetUploadFile(name?: string, collectionId?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Asset>>;
111
+ public httpAssetUploadFile(name?: string, collectionId?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Asset>>;
112
+ public httpAssetUploadFile(name?: string, collectionId?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
113
+
114
+ let headers = this.defaultHeaders;
115
+
116
+ let credential: string | undefined;
117
+ // authentication (function_key) required
118
+ credential = this.configuration.lookupCredential('function_key');
119
+ if (credential) {
120
+ headers = headers.set('x-functions-key', credential);
121
+ }
122
+
123
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
124
+ if (httpHeaderAcceptSelected === undefined) {
125
+ // to determine the Accept header
126
+ const httpHeaderAccepts: string[] = [
127
+ 'application/json'
128
+ ];
129
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
130
+ }
131
+ if (httpHeaderAcceptSelected !== undefined) {
132
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
133
+ }
134
+
135
+ // to determine the Content-Type header
136
+ const consumes: string[] = [
137
+ 'multipart/form-data'
138
+ ];
139
+
140
+ const canConsumeForm = this.canConsumeForm(consumes);
141
+
142
+ let formParams: { append(param: string, value: any): any; };
143
+ let useForm = false;
144
+ let convertFormParamsToString = false;
145
+ // use FormData to transmit files using content-type "multipart/form-data"
146
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
147
+ useForm = canConsumeForm;
148
+ if (useForm) {
149
+ formParams = new FormData();
150
+ } else {
151
+ formParams = new HttpParams({encoder: this.encoder});
152
+ }
153
+
154
+ if (name !== undefined) {
155
+ formParams = formParams.append('name', <any>name) as any || formParams;
156
+ }
157
+ if (collectionId !== undefined) {
158
+ formParams = formParams.append('collectionId', <any>collectionId) as any || formParams;
159
+ }
160
+ if (file !== undefined) {
161
+ formParams = formParams.append('file', <any>file) as any || formParams;
162
+ }
163
+
164
+ let responseType_: 'text' | 'json' = 'json';
165
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
166
+ responseType_ = 'text';
167
+ }
168
+
169
+ return this.httpClient.post<Asset>(`${this.configuration.basePath}/assetsupload`,
170
+ convertFormParamsToString ? formParams.toString() : formParams,
171
+ {
172
+ responseType: <any>responseType_,
173
+ withCredentials: this.configuration.withCredentials,
174
+ headers: headers,
175
+ observe: observe,
176
+ reportProgress: reportProgress
177
+ }
178
+ );
179
+ }
180
+
181
+ /**
182
+ * This endpoint creates one asset entry in the database.
183
+ * @param collectionid The ID of the collection where this assets should be assigned.
184
+ * @param asset This endpoint creates an unique asset ID and adds the information to the database.
185
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
186
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
187
+ * @param reportProgress flag to report request and response progress.
188
+ */
189
+ public httpAssetsCreate(collectionid: string, asset: Asset, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Asset>;
190
+ public httpAssetsCreate(collectionid: string, asset: Asset, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Asset>>;
191
+ public httpAssetsCreate(collectionid: string, asset: Asset, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Asset>>;
192
+ public httpAssetsCreate(collectionid: string, asset: Asset, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
193
+ if (collectionid === null || collectionid === undefined) {
194
+ throw new Error('Required parameter collectionid was null or undefined when calling httpAssetsCreate.');
195
+ }
196
+ if (asset === null || asset === undefined) {
197
+ throw new Error('Required parameter asset was null or undefined when calling httpAssetsCreate.');
198
+ }
199
+
200
+ let queryParameters = new HttpParams({encoder: this.encoder});
201
+ if (collectionid !== undefined && collectionid !== null) {
202
+ queryParameters = this.addToHttpParams(queryParameters,
203
+ <any>collectionid, 'collectionid');
204
+ }
205
+ if (translations !== undefined && translations !== null) {
206
+ queryParameters = this.addToHttpParams(queryParameters,
207
+ <any>translations, 'translations');
208
+ }
209
+
210
+ let headers = this.defaultHeaders;
211
+
212
+ let credential: string | undefined;
213
+ // authentication (function_key) required
214
+ credential = this.configuration.lookupCredential('function_key');
215
+ if (credential) {
216
+ headers = headers.set('x-functions-key', credential);
217
+ }
218
+
219
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
220
+ if (httpHeaderAcceptSelected === undefined) {
221
+ // to determine the Accept header
222
+ const httpHeaderAccepts: string[] = [
223
+ 'application/json'
224
+ ];
225
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
226
+ }
227
+ if (httpHeaderAcceptSelected !== undefined) {
228
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
229
+ }
230
+
231
+
232
+ // to determine the Content-Type header
233
+ const consumes: string[] = [
234
+ 'application/json'
235
+ ];
236
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
237
+ if (httpContentTypeSelected !== undefined) {
238
+ headers = headers.set('Content-Type', httpContentTypeSelected);
239
+ }
240
+
241
+ let responseType_: 'text' | 'json' = 'json';
242
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
243
+ responseType_ = 'text';
244
+ }
245
+
246
+ return this.httpClient.post<Asset>(`${this.configuration.basePath}/assets`,
247
+ asset,
248
+ {
249
+ params: queryParameters,
250
+ responseType: <any>responseType_,
251
+ withCredentials: this.configuration.withCredentials,
252
+ headers: headers,
253
+ observe: observe,
254
+ reportProgress: reportProgress
255
+ }
256
+ );
257
+ }
258
+
259
+ /**
260
+ * This endpoint lists all the assets, which are stored in the database and not deleted (status \&quot;A\&quot;)
261
+ * @param collectionid The ID of the collection where these assets should come from. (\&quot;empty\&quot; is allowed)
262
+ * @param fields This limits the fields which are returned, separated by comma (\&#39;,\&#39;). Blobs can be limited with \&#39;.\&#39; on their container. (i.e. fields&#x3D;blobs.thumbnails). Only if \&#39;thumbnails\&#39; is set, the placeholder of this asset type are returned if no thumbnail blob is found.
263
+ * @param expose This indicates if the given blobs should have URLs where these can be requested. (If not limited through \&#39;fields\&#39; parameter it will expose all URLs of all blobs.)
264
+ * @param continuationToken Each result returns the continous token if more results are available than requested. With this token, the next page could be fetched. (URL encoded!)
265
+ * @param limit This number limits the page result of assets.
266
+ * @param orderby How the return assets are sorted. Default is property: created_date (newest first).
267
+ * @param filter This will limit the output on specific parameters which are separated by \&#39;:\&#39;, \&#39;!:\&#39;, \&#39;&gt;\&#39;, \&#39;&gt;&#x3D;\&#39;, \&#39;&lt;\&#39;, \&#39;&lt;&#x3D;\&#39;
268
+ * @param items The items can be extended to fully filled items.
269
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
270
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
271
+ * @param reportProgress flag to report request and response progress.
272
+ */
273
+ public httpAssetsGet(collectionid?: string, fields?: string, expose?: boolean, continuationToken?: string, limit?: number, orderby?: string, filter?: string, items?: boolean, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AssetPageResult>;
274
+ public httpAssetsGet(collectionid?: string, fields?: string, expose?: boolean, continuationToken?: string, limit?: number, orderby?: string, filter?: string, items?: boolean, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AssetPageResult>>;
275
+ public httpAssetsGet(collectionid?: string, fields?: string, expose?: boolean, continuationToken?: string, limit?: number, orderby?: string, filter?: string, items?: boolean, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AssetPageResult>>;
276
+ public httpAssetsGet(collectionid?: string, fields?: string, expose?: boolean, continuationToken?: string, limit?: number, orderby?: string, filter?: string, items?: boolean, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
277
+
278
+ let queryParameters = new HttpParams({encoder: this.encoder});
279
+ if (collectionid !== undefined && collectionid !== null) {
280
+ queryParameters = this.addToHttpParams(queryParameters,
281
+ <any>collectionid, 'collectionid');
282
+ }
283
+ if (fields !== undefined && fields !== null) {
284
+ queryParameters = this.addToHttpParams(queryParameters,
285
+ <any>fields, 'fields');
286
+ }
287
+ if (expose !== undefined && expose !== null) {
288
+ queryParameters = this.addToHttpParams(queryParameters,
289
+ <any>expose, 'expose');
290
+ }
291
+ if (continuationToken !== undefined && continuationToken !== null) {
292
+ queryParameters = this.addToHttpParams(queryParameters,
293
+ <any>continuationToken, 'continuation_token');
294
+ }
295
+ if (limit !== undefined && limit !== null) {
296
+ queryParameters = this.addToHttpParams(queryParameters,
297
+ <any>limit, 'limit');
298
+ }
299
+ if (orderby !== undefined && orderby !== null) {
300
+ queryParameters = this.addToHttpParams(queryParameters,
301
+ <any>orderby, 'orderby');
302
+ }
303
+ if (filter !== undefined && filter !== null) {
304
+ queryParameters = this.addToHttpParams(queryParameters,
305
+ <any>filter, 'filter');
306
+ }
307
+ if (items !== undefined && items !== null) {
308
+ queryParameters = this.addToHttpParams(queryParameters,
309
+ <any>items, 'items');
310
+ }
311
+ if (translations !== undefined && translations !== null) {
312
+ queryParameters = this.addToHttpParams(queryParameters,
313
+ <any>translations, 'translations');
314
+ }
315
+
316
+ let headers = this.defaultHeaders;
317
+
318
+ let credential: string | undefined;
319
+ // authentication (function_key) required
320
+ credential = this.configuration.lookupCredential('function_key');
321
+ if (credential) {
322
+ headers = headers.set('x-functions-key', credential);
323
+ }
324
+
325
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
326
+ if (httpHeaderAcceptSelected === undefined) {
327
+ // to determine the Accept header
328
+ const httpHeaderAccepts: string[] = [
329
+ 'application/json'
330
+ ];
331
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
332
+ }
333
+ if (httpHeaderAcceptSelected !== undefined) {
334
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
335
+ }
336
+
337
+
338
+ let responseType_: 'text' | 'json' = 'json';
339
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
340
+ responseType_ = 'text';
341
+ }
342
+
343
+ return this.httpClient.get<AssetPageResult>(`${this.configuration.basePath}/assets`,
344
+ {
345
+ params: queryParameters,
346
+ responseType: <any>responseType_,
347
+ withCredentials: this.configuration.withCredentials,
348
+ headers: headers,
349
+ observe: observe,
350
+ reportProgress: reportProgress
351
+ }
352
+ );
353
+ }
354
+
355
+ /**
356
+ * This endpoint returns one single asset (from ID). If the returned asset is from a special asset type (e.g. \&quot;AssetImage\&quot;) it returns the full entity.
357
+ * @param id The ID of the asset.
358
+ * @param fields Which fields are need to be filled out with comma separated. If one is set all non mandatory fields are left out. No validation if field exist.
359
+ * @param expose This indicates if the given blobs should have URLs where these can be requested. It will expose placeholder blobs if no \&#39;thumbnail\&#39; is found.
360
+ * @param techdata This parameter will include the techdata property inside orig_blob.
361
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
362
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
363
+ * @param reportProgress flag to report request and response progress.
364
+ */
365
+ public httpAssetsGetById(id: string, fields?: string, expose?: boolean, techdata?: boolean, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Asset>;
366
+ public httpAssetsGetById(id: string, fields?: string, expose?: boolean, techdata?: boolean, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Asset>>;
367
+ public httpAssetsGetById(id: string, fields?: string, expose?: boolean, techdata?: boolean, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Asset>>;
368
+ public httpAssetsGetById(id: string, fields?: string, expose?: boolean, techdata?: boolean, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
369
+ if (id === null || id === undefined) {
370
+ throw new Error('Required parameter id was null or undefined when calling httpAssetsGetById.');
371
+ }
372
+
373
+ let queryParameters = new HttpParams({encoder: this.encoder});
374
+ if (fields !== undefined && fields !== null) {
375
+ queryParameters = this.addToHttpParams(queryParameters,
376
+ <any>fields, 'fields');
377
+ }
378
+ if (expose !== undefined && expose !== null) {
379
+ queryParameters = this.addToHttpParams(queryParameters,
380
+ <any>expose, 'expose');
381
+ }
382
+ if (techdata !== undefined && techdata !== null) {
383
+ queryParameters = this.addToHttpParams(queryParameters,
384
+ <any>techdata, 'techdata');
385
+ }
386
+ if (translations !== undefined && translations !== null) {
387
+ queryParameters = this.addToHttpParams(queryParameters,
388
+ <any>translations, 'translations');
389
+ }
390
+
391
+ let headers = this.defaultHeaders;
392
+
393
+ let credential: string | undefined;
394
+ // authentication (function_key) required
395
+ credential = this.configuration.lookupCredential('function_key');
396
+ if (credential) {
397
+ headers = headers.set('x-functions-key', credential);
398
+ }
399
+
400
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
401
+ if (httpHeaderAcceptSelected === undefined) {
402
+ // to determine the Accept header
403
+ const httpHeaderAccepts: string[] = [
404
+ 'application/json'
405
+ ];
406
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
407
+ }
408
+ if (httpHeaderAcceptSelected !== undefined) {
409
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
410
+ }
411
+
412
+
413
+ let responseType_: 'text' | 'json' = 'json';
414
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
415
+ responseType_ = 'text';
416
+ }
417
+
418
+ return this.httpClient.get<Asset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}`,
419
+ {
420
+ params: queryParameters,
421
+ responseType: <any>responseType_,
422
+ withCredentials: this.configuration.withCredentials,
423
+ headers: headers,
424
+ observe: observe,
425
+ reportProgress: reportProgress
426
+ }
427
+ );
428
+ }
429
+
430
+ /**
431
+ * This endpoint updates one single asset (from ID)
432
+ * @param id The ID of the asset.
433
+ * @param asset The body has to contain one of the mentioned elements and a valid json. Not fitting properties are ignored.
434
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
435
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
436
+ * @param reportProgress flag to report request and response progress.
437
+ */
438
+ public httpPublicAssetsUpdateById(id: string, asset: Asset, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Asset>;
439
+ public httpPublicAssetsUpdateById(id: string, asset: Asset, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Asset>>;
440
+ public httpPublicAssetsUpdateById(id: string, asset: Asset, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Asset>>;
441
+ public httpPublicAssetsUpdateById(id: string, asset: Asset, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
442
+ if (id === null || id === undefined) {
443
+ throw new Error('Required parameter id was null or undefined when calling httpPublicAssetsUpdateById.');
444
+ }
445
+ if (asset === null || asset === undefined) {
446
+ throw new Error('Required parameter asset was null or undefined when calling httpPublicAssetsUpdateById.');
447
+ }
448
+
449
+ let queryParameters = new HttpParams({encoder: this.encoder});
450
+ if (translations !== undefined && translations !== null) {
451
+ queryParameters = this.addToHttpParams(queryParameters,
452
+ <any>translations, 'translations');
453
+ }
454
+
455
+ let headers = this.defaultHeaders;
456
+
457
+ let credential: string | undefined;
458
+ // authentication (function_key) required
459
+ credential = this.configuration.lookupCredential('function_key');
460
+ if (credential) {
461
+ headers = headers.set('x-functions-key', credential);
462
+ }
463
+
464
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
465
+ if (httpHeaderAcceptSelected === undefined) {
466
+ // to determine the Accept header
467
+ const httpHeaderAccepts: string[] = [
468
+ 'application/json'
469
+ ];
470
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
471
+ }
472
+ if (httpHeaderAcceptSelected !== undefined) {
473
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
474
+ }
475
+
476
+
477
+ // to determine the Content-Type header
478
+ const consumes: string[] = [
479
+ 'application/json'
480
+ ];
481
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
482
+ if (httpContentTypeSelected !== undefined) {
483
+ headers = headers.set('Content-Type', httpContentTypeSelected);
484
+ }
485
+
486
+ let responseType_: 'text' | 'json' = 'json';
487
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
488
+ responseType_ = 'text';
489
+ }
490
+
491
+ return this.httpClient.post<Asset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}`,
492
+ asset,
493
+ {
494
+ params: queryParameters,
495
+ responseType: <any>responseType_,
496
+ withCredentials: this.configuration.withCredentials,
497
+ headers: headers,
498
+ observe: observe,
499
+ reportProgress: reportProgress
500
+ }
501
+ );
502
+ }
503
+
504
+ }