@agravity/private 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 (119) hide show
  1. package/.openapi-generator/FILES +117 -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 +67 -0
  6. package/api/assetIconRuleManagement.agravity.ts +400 -0
  7. package/api/assetManagement.agravity.ts +737 -0
  8. package/api/assetOperations.agravity.ts +1309 -0
  9. package/api/assetPublishing.agravity.ts +511 -0
  10. package/api/assetVersioning.agravity.ts +657 -0
  11. package/api/authenticationManagement.agravity.ts +502 -0
  12. package/api/collectionManagement.agravity.ts +618 -0
  13. package/api/collectionSharing.agravity.ts +329 -0
  14. package/api/collectionTypeItemBlueprintManagement.agravity.ts +340 -0
  15. package/api/collectionTypeManagement.agravity.ts +533 -0
  16. package/api/configurationManagement.agravity.ts +311 -0
  17. package/api/downloadFormatManagement.agravity.ts +400 -0
  18. package/api/downloadZip.agravity.ts +151 -0
  19. package/api/generalManagement.agravity.ts +348 -0
  20. package/api/helperTools.agravity.ts +640 -0
  21. package/api/iccProfileManagement.agravity.ts +134 -0
  22. package/api/listBlobs.agravity.ts +185 -0
  23. package/api/listQueues.agravity.ts +134 -0
  24. package/api/permissionsManagement.agravity.ts +262 -0
  25. package/api/publishing.agravity.ts +148 -0
  26. package/api/quickshareManagement.agravity.ts +385 -0
  27. package/api/savedSearchManagement.agravity.ts +271 -0
  28. package/api/searchManagement.agravity.ts +345 -0
  29. package/api/secureUpload.agravity.ts +371 -0
  30. package/api/signalRConnectionManagement.agravity.ts +218 -0
  31. package/api/staticDefinedListManagement.agravity.ts +408 -0
  32. package/api/stockImport.agravity.ts +221 -0
  33. package/api/structureImport.agravity.ts +137 -0
  34. package/api/translationManagement.agravity.ts +404 -0
  35. package/api/upgradeManagement.agravity.ts +333 -0
  36. package/api/webAppData.agravity.ts +300 -0
  37. package/api/wordpressManagement.agravity.ts +282 -0
  38. package/api/workspaceManagement.agravity.ts +513 -0
  39. package/api.module.ts +63 -0
  40. package/configuration.ts +130 -0
  41. package/encoder.ts +20 -0
  42. package/git_push.sh +58 -0
  43. package/index.ts +5 -0
  44. package/model/agravityErrorResponse.agravity.ts +19 -0
  45. package/model/agravityInfoResponse.agravity.ts +19 -0
  46. package/model/agravityUser.agravity.ts +37 -0
  47. package/model/agravityVersion.agravity.ts +24 -0
  48. package/model/allWebAppData.agravity.ts +24 -0
  49. package/model/apiKeyResponse.agravity.ts +18 -0
  50. package/model/appConfigTableEntity.agravity.ts +25 -0
  51. package/model/artificialIntelligenceGroup.agravity.ts +20 -0
  52. package/model/asset.agravity.ts +47 -0
  53. package/model/assetAvailability.agravity.ts +19 -0
  54. package/model/assetBlob.agravity.ts +82 -0
  55. package/model/assetBulkUpdate.agravity.ts +20 -0
  56. package/model/assetCollectionLink.agravity.ts +18 -0
  57. package/model/assetIconRule.agravity.ts +35 -0
  58. package/model/assetIdContainer.agravity.ts +18 -0
  59. package/model/assetPageResult.agravity.ts +23 -0
  60. package/model/assetsOperationBody.agravity.ts +20 -0
  61. package/model/azSearchOptions.agravity.ts +25 -0
  62. package/model/azureIdentity.agravity.ts +30 -0
  63. package/model/blobInfoObj.agravity.ts +23 -0
  64. package/model/collTypeItem.agravity.ts +38 -0
  65. package/model/collTypeItemBlueprint.agravity.ts +31 -0
  66. package/model/collection.agravity.ts +35 -0
  67. package/model/collectionType.agravity.ts +35 -0
  68. package/model/collectionUDL.agravity.ts +21 -0
  69. package/model/createSftpUserResult.agravity.ts +18 -0
  70. package/model/dataResult.agravity.ts +22 -0
  71. package/model/distZipResponse.agravity.ts +19 -0
  72. package/model/downloadFormat.agravity.ts +34 -0
  73. package/model/downloadObject.agravity.ts +32 -0
  74. package/model/downloadZipRequest.agravity.ts +25 -0
  75. package/model/dynamicImageOperation.agravity.ts +18 -0
  76. package/model/emailAddress.agravity.ts +18 -0
  77. package/model/entityId.agravity.ts +17 -0
  78. package/model/entityIdName.agravity.ts +19 -0
  79. package/model/entityTranslations.agravity.ts +18 -0
  80. package/model/frontendAppConfig.agravity.ts +21 -0
  81. package/model/groupAllAppData.agravity.ts +26 -0
  82. package/model/infoEntitySkillEnhanced.agravity.ts +25 -0
  83. package/model/metadata.agravity.ts +19 -0
  84. package/model/models.ts +73 -0
  85. package/model/moveCollectionBody.agravity.ts +19 -0
  86. package/model/permissionChange.agravity.ts +29 -0
  87. package/model/permissionSetting.agravity.ts +27 -0
  88. package/model/publishEntity.agravity.ts +28 -0
  89. package/model/publishedAsset.agravity.ts +25 -0
  90. package/model/quickShare.agravity.ts +31 -0
  91. package/model/quickShareFull.agravity.ts +36 -0
  92. package/model/sasToken.agravity.ts +22 -0
  93. package/model/savedSearch.agravity.ts +31 -0
  94. package/model/searchAdminDataSourceStatus.agravity.ts +18 -0
  95. package/model/searchAdminIndexStatus.agravity.ts +20 -0
  96. package/model/searchAdminIndexerLastRun.agravity.ts +21 -0
  97. package/model/searchAdminIndexerStatus.agravity.ts +20 -0
  98. package/model/searchAdminSkillStatus.agravity.ts +18 -0
  99. package/model/searchAdminStatistics.agravity.ts +18 -0
  100. package/model/searchAdminStatus.agravity.ts +24 -0
  101. package/model/searchFacet.agravity.ts +19 -0
  102. package/model/searchFacetEntity.agravity.ts +19 -0
  103. package/model/searchResult.agravity.ts +23 -0
  104. package/model/searchableItem.agravity.ts +26 -0
  105. package/model/secureUploadEntity.agravity.ts +27 -0
  106. package/model/sharedAsset.agravity.ts +25 -0
  107. package/model/sharedCollection.agravity.ts +24 -0
  108. package/model/sharedCollectionFull.agravity.ts +29 -0
  109. package/model/signalRConnectionInfo.agravity.ts +18 -0
  110. package/model/simpleAsset.agravity.ts +26 -0
  111. package/model/staticDefinedList.agravity.ts +30 -0
  112. package/model/uiTutorials.agravity.ts +26 -0
  113. package/model/upgradeV2V3CollectionCustomItemTableEntity.agravity.ts +21 -0
  114. package/model/versionEntity.agravity.ts +28 -0
  115. package/model/versionedAsset.agravity.ts +20 -0
  116. package/model/whereParam.agravity.ts +43 -0
  117. package/model/workspace.agravity.ts +34 -0
  118. package/package.json +28 -0
  119. package/variables.ts +9 -0
@@ -0,0 +1,657 @@
1
+ /**
2
+ * Agravity OpenAPI Documentation - Private Functions
3
+ * <h1>Agravity API Reference</h1>This is the full 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>Assets versioning</li> <li>Sharing collection</li> <li>Secure upload to collection</li> <li>Download ZIP</li> <li>Search</li> <li>General management</li> <li>Authentication management</li> <li>Blob management</li> <li>Queue management</li> <li>Structure management</li> <li>Bulk get all data from collection / collection type</li></ul><h2> Operations</h2>Agravity API performs the following operations:<ul> <li>Create / update / list / delete collection types</li> <li>Create / update / list / delete collections</li> <li>Create / update / list / delete assets</li> <li>Operations on assets like: move to collection, renew asset(through queue pipe), rotate, resize, etc.</li> <li>Publish / de-publish an asset or specific variants of an asset</li> <li>Create / delete version of asset</li> <li>Bulk download of Assets</li> <li>Search for assets or collections</li> <li>Authenticated access like e.g. getting access to blobs directly (for upload on folder or generate SAS token)</li> <li>List / delete blobs</li> <li>Create structures based on blob storage input</li></ul><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 { AssetBlob } from '../model/models';
22
+ import { VersionEntity } from '../model/models';
23
+ import { VersionedAsset } from '../model/models';
24
+
25
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
26
+ import { AgravityConfiguration } from '../configuration';
27
+
28
+
29
+
30
+ @Injectable({
31
+ providedIn: 'root'
32
+ })
33
+ export class AssetVersioningService {
34
+
35
+ protected basePath = 'http://localhost:7071/api';
36
+ public defaultHeaders = new HttpHeaders();
37
+ public configuration = new AgravityConfiguration();
38
+ public encoder: HttpParameterCodec;
39
+
40
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityConfiguration) {
41
+ if (configuration) {
42
+ this.configuration = configuration;
43
+ }
44
+ if (typeof this.configuration.basePath !== 'string') {
45
+ if (typeof basePath !== 'string') {
46
+ basePath = this.basePath;
47
+ }
48
+ this.configuration.basePath = basePath;
49
+ }
50
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
51
+ }
52
+
53
+ /**
54
+ * @param consumes string[] mime-types
55
+ * @return true: consumes contains 'multipart/form-data', false: otherwise
56
+ */
57
+ private canConsumeForm(consumes: string[]): boolean {
58
+ const form = 'multipart/form-data';
59
+ for (const consume of consumes) {
60
+ if (form === consume) {
61
+ return true;
62
+ }
63
+ }
64
+ return false;
65
+ }
66
+
67
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
68
+ if (typeof value === "object" && value instanceof Date === false) {
69
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
70
+ } else {
71
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
72
+ }
73
+ return httpParams;
74
+ }
75
+
76
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
77
+ if (value == null) {
78
+ return httpParams;
79
+ }
80
+
81
+ if (typeof value === "object") {
82
+ if (Array.isArray(value)) {
83
+ (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
84
+ } else if (value instanceof Date) {
85
+ if (key != null) {
86
+ httpParams = httpParams.append(key,
87
+ (value as Date).toISOString().substr(0, 10));
88
+ } else {
89
+ throw Error("key may not be null if value is Date");
90
+ }
91
+ } else {
92
+ Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
93
+ httpParams, value[k], key != null ? `${key}.${k}` : k));
94
+ }
95
+ } else if (key != null) {
96
+ httpParams = httpParams.append(key, value);
97
+ } else {
98
+ throw Error("key may not be null if value is not object or array");
99
+ }
100
+ return httpParams;
101
+ }
102
+
103
+ /**
104
+ * This endpoint allows to create empty version or upload one asset which replaces the asset with given id and creates version.
105
+ * @param id The ID of the asset.
106
+ * @param versionedAsset This VersionedAsset to create empty version (need to upload file with metadata to blob storage)
107
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
108
+ * @param reportProgress flag to report request and response progress.
109
+ */
110
+ public httpAssetCreateNewVersion(id: string, versionedAsset: VersionedAsset, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<VersionedAsset>;
111
+ public httpAssetCreateNewVersion(id: string, versionedAsset: VersionedAsset, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<VersionedAsset>>;
112
+ public httpAssetCreateNewVersion(id: string, versionedAsset: VersionedAsset, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<VersionedAsset>>;
113
+ public httpAssetCreateNewVersion(id: string, versionedAsset: VersionedAsset, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
114
+ if (id === null || id === undefined) {
115
+ throw new Error('Required parameter id was null or undefined when calling httpAssetCreateNewVersion.');
116
+ }
117
+ if (versionedAsset === null || versionedAsset === undefined) {
118
+ throw new Error('Required parameter versionedAsset was null or undefined when calling httpAssetCreateNewVersion.');
119
+ }
120
+
121
+ let headers = this.defaultHeaders;
122
+
123
+ let credential: string | undefined;
124
+ // authentication (msal_auth) required
125
+ credential = this.configuration.lookupCredential('msal_auth');
126
+ if (credential) {
127
+ headers = headers.set('Authorization', 'Bearer ' + credential);
128
+ }
129
+
130
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
131
+ if (httpHeaderAcceptSelected === undefined) {
132
+ // to determine the Accept header
133
+ const httpHeaderAccepts: string[] = [
134
+ 'application/json'
135
+ ];
136
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
137
+ }
138
+ if (httpHeaderAcceptSelected !== undefined) {
139
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
140
+ }
141
+
142
+
143
+ // to determine the Content-Type header
144
+ const consumes: string[] = [
145
+ 'application/json'
146
+ ];
147
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
148
+ if (httpContentTypeSelected !== undefined) {
149
+ // headers = headers.set('Content-Type', httpContentTypeSelected);
150
+ }
151
+
152
+ let responseType_: 'text' | 'json' = 'json';
153
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
154
+ responseType_ = 'text';
155
+ }
156
+
157
+ return this.httpClient.post<VersionedAsset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versions`,
158
+ versionedAsset,
159
+ {
160
+ responseType: <any>responseType_,
161
+ withCredentials: this.configuration.withCredentials,
162
+ headers: headers,
163
+ observe: observe,
164
+ reportProgress: reportProgress
165
+ }
166
+ );
167
+ }
168
+
169
+ /**
170
+ * This endpoint allows to upload one asset which replaces the asset with given id and creates a version which is returned.
171
+ * @param id The ID of the asset.
172
+ * @param name
173
+ * @param collectionId
174
+ * @param file
175
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
176
+ * @param reportProgress flag to report request and response progress.
177
+ */
178
+ public httpAssetCreateUploadVersion(id: string, name?: string, collectionId?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<VersionedAsset>;
179
+ public httpAssetCreateUploadVersion(id: string, name?: string, collectionId?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<VersionedAsset>>;
180
+ public httpAssetCreateUploadVersion(id: string, name?: string, collectionId?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<VersionedAsset>>;
181
+ public httpAssetCreateUploadVersion(id: string, name?: string, collectionId?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
182
+ if (id === null || id === undefined) {
183
+ throw new Error('Required parameter id was null or undefined when calling httpAssetCreateUploadVersion.');
184
+ }
185
+
186
+ let headers = this.defaultHeaders;
187
+
188
+ let credential: string | undefined;
189
+ // authentication (msal_auth) required
190
+ credential = this.configuration.lookupCredential('msal_auth');
191
+ if (credential) {
192
+ headers = headers.set('Authorization', 'Bearer ' + credential);
193
+ }
194
+
195
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
196
+ if (httpHeaderAcceptSelected === undefined) {
197
+ // to determine the Accept header
198
+ const httpHeaderAccepts: string[] = [
199
+ 'application/json'
200
+ ];
201
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
202
+ }
203
+ if (httpHeaderAcceptSelected !== undefined) {
204
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
205
+ }
206
+
207
+ // to determine the Content-Type header
208
+ const consumes: string[] = [
209
+ 'multipart/form-data'
210
+ ];
211
+
212
+ const canConsumeForm = this.canConsumeForm(consumes);
213
+
214
+ let formParams: { append(param: string, value: any): any; };
215
+ let useForm = false;
216
+ let convertFormParamsToString = false;
217
+ // use FormData to transmit files using content-type "multipart/form-data"
218
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
219
+ useForm = canConsumeForm;
220
+ if (useForm) {
221
+ formParams = new FormData();
222
+ } else {
223
+ formParams = new HttpParams({encoder: this.encoder});
224
+ }
225
+
226
+ if (name !== undefined) {
227
+ formParams = formParams.append('name', <any>name) as any || formParams;
228
+ }
229
+ if (collectionId !== undefined) {
230
+ formParams = formParams.append('collectionId', <any>collectionId) as any || formParams;
231
+ }
232
+ if (file !== undefined) {
233
+ formParams = formParams.append('file', <any>file) as any || formParams;
234
+ }
235
+
236
+ let responseType_: 'text' | 'json' = 'json';
237
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
238
+ responseType_ = 'text';
239
+ }
240
+
241
+ return this.httpClient.post<VersionedAsset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versionsupload`,
242
+ convertFormParamsToString ? formParams.toString() : formParams,
243
+ {
244
+ responseType: <any>responseType_,
245
+ withCredentials: this.configuration.withCredentials,
246
+ headers: headers,
247
+ observe: observe,
248
+ reportProgress: reportProgress
249
+ }
250
+ );
251
+ }
252
+
253
+ /**
254
+ * This endpoint restores the last version of this asset (even when corrupt or no blob was uploaded).
255
+ * @param id The ID of the asset.
256
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
257
+ * @param reportProgress flag to report request and response progress.
258
+ */
259
+ public httpAssetRestoreLastVersion(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<VersionedAsset>;
260
+ public httpAssetRestoreLastVersion(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<VersionedAsset>>;
261
+ public httpAssetRestoreLastVersion(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<VersionedAsset>>;
262
+ public httpAssetRestoreLastVersion(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
263
+ if (id === null || id === undefined) {
264
+ throw new Error('Required parameter id was null or undefined when calling httpAssetRestoreLastVersion.');
265
+ }
266
+
267
+ let headers = this.defaultHeaders;
268
+
269
+ let credential: string | undefined;
270
+ // authentication (msal_auth) required
271
+ credential = this.configuration.lookupCredential('msal_auth');
272
+ if (credential) {
273
+ headers = headers.set('Authorization', 'Bearer ' + credential);
274
+ }
275
+
276
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
277
+ if (httpHeaderAcceptSelected === undefined) {
278
+ // to determine the Accept header
279
+ const httpHeaderAccepts: string[] = [
280
+ 'application/json'
281
+ ];
282
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
283
+ }
284
+ if (httpHeaderAcceptSelected !== undefined) {
285
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
286
+ }
287
+
288
+
289
+ let responseType_: 'text' | 'json' = 'json';
290
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
291
+ responseType_ = 'text';
292
+ }
293
+
294
+ return this.httpClient.patch<VersionedAsset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versionsrestore`,
295
+ null,
296
+ {
297
+ responseType: <any>responseType_,
298
+ withCredentials: this.configuration.withCredentials,
299
+ headers: headers,
300
+ observe: observe,
301
+ reportProgress: reportProgress
302
+ }
303
+ );
304
+ }
305
+
306
+ /**
307
+ * This endpoint deletes a version of an asset.
308
+ * @param id The ID of the asset.
309
+ * @param vNr The version number of the asset.
310
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
311
+ * @param reportProgress flag to report request and response progress.
312
+ */
313
+ public httpDeleteVersionedAssetsById(id: string, vNr: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
314
+ public httpDeleteVersionedAssetsById(id: string, vNr: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
315
+ public httpDeleteVersionedAssetsById(id: string, vNr: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
316
+ public httpDeleteVersionedAssetsById(id: string, vNr: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
317
+ if (id === null || id === undefined) {
318
+ throw new Error('Required parameter id was null or undefined when calling httpDeleteVersionedAssetsById.');
319
+ }
320
+ if (vNr === null || vNr === undefined) {
321
+ throw new Error('Required parameter vNr was null or undefined when calling httpDeleteVersionedAssetsById.');
322
+ }
323
+
324
+ let headers = this.defaultHeaders;
325
+
326
+ let credential: string | undefined;
327
+ // authentication (msal_auth) required
328
+ credential = this.configuration.lookupCredential('msal_auth');
329
+ if (credential) {
330
+ headers = headers.set('Authorization', 'Bearer ' + credential);
331
+ }
332
+
333
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
334
+ if (httpHeaderAcceptSelected === undefined) {
335
+ // to determine the Accept header
336
+ const httpHeaderAccepts: string[] = [
337
+ 'application/json'
338
+ ];
339
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
340
+ }
341
+ if (httpHeaderAcceptSelected !== undefined) {
342
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
343
+ }
344
+
345
+
346
+ let responseType_: 'text' | 'json' = 'json';
347
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
348
+ responseType_ = 'text';
349
+ }
350
+
351
+ return this.httpClient.delete<any>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versions/${encodeURIComponent(String(vNr))}`,
352
+ {
353
+ responseType: <any>responseType_,
354
+ withCredentials: this.configuration.withCredentials,
355
+ headers: headers,
356
+ observe: observe,
357
+ reportProgress: reportProgress
358
+ }
359
+ );
360
+ }
361
+
362
+ /**
363
+ * This endpoint checks if assets and version exists and returns the url for the requested blob.
364
+ * @param id The ID of the asset.
365
+ * @param vNr The version number of the asset.
366
+ * @param c \&quot;t\&quot; for thumbnail (default); \&quot;o\&quot; for optimized
367
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
368
+ * @param reportProgress flag to report request and response progress.
369
+ */
370
+ public httpGetVersionedAssetBlobById(id: string, vNr: number, c?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AssetBlob>;
371
+ public httpGetVersionedAssetBlobById(id: string, vNr: number, c?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AssetBlob>>;
372
+ public httpGetVersionedAssetBlobById(id: string, vNr: number, c?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AssetBlob>>;
373
+ public httpGetVersionedAssetBlobById(id: string, vNr: number, c?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
374
+ if (id === null || id === undefined) {
375
+ throw new Error('Required parameter id was null or undefined when calling httpGetVersionedAssetBlobById.');
376
+ }
377
+ if (vNr === null || vNr === undefined) {
378
+ throw new Error('Required parameter vNr was null or undefined when calling httpGetVersionedAssetBlobById.');
379
+ }
380
+
381
+ let queryParameters = new HttpParams({encoder: this.encoder});
382
+ if (c !== undefined && c !== null) {
383
+ queryParameters = this.addToHttpParams(queryParameters,
384
+ <any>c, 'c');
385
+ }
386
+
387
+ let headers = this.defaultHeaders;
388
+
389
+ let credential: string | undefined;
390
+ // authentication (msal_auth) required
391
+ credential = this.configuration.lookupCredential('msal_auth');
392
+ if (credential) {
393
+ headers = headers.set('Authorization', 'Bearer ' + credential);
394
+ }
395
+
396
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
397
+ if (httpHeaderAcceptSelected === undefined) {
398
+ // to determine the Accept header
399
+ const httpHeaderAccepts: string[] = [
400
+ 'application/json'
401
+ ];
402
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
403
+ }
404
+ if (httpHeaderAcceptSelected !== undefined) {
405
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
406
+ }
407
+
408
+
409
+ let responseType_: 'text' | 'json' = 'json';
410
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
411
+ responseType_ = 'text';
412
+ }
413
+
414
+ return this.httpClient.get<AssetBlob>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versions/${encodeURIComponent(String(vNr))}/blobs`,
415
+ {
416
+ params: queryParameters,
417
+ responseType: <any>responseType_,
418
+ withCredentials: this.configuration.withCredentials,
419
+ headers: headers,
420
+ observe: observe,
421
+ reportProgress: reportProgress
422
+ }
423
+ );
424
+ }
425
+
426
+ /**
427
+ * This endpoint restores a version nr to be the current version and saves the current asset as version.
428
+ * @param id The ID of the asset.
429
+ * @param vNr The version number of the asset.
430
+ * @param versionedAsset Only the version_info is used and will be added to the current version which is archived (before the old version is restored).
431
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
432
+ * @param reportProgress flag to report request and response progress.
433
+ */
434
+ public httpRestoreVersionedAssetsById(id: string, vNr: string, versionedAsset: VersionedAsset, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<VersionedAsset>;
435
+ public httpRestoreVersionedAssetsById(id: string, vNr: string, versionedAsset: VersionedAsset, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<VersionedAsset>>;
436
+ public httpRestoreVersionedAssetsById(id: string, vNr: string, versionedAsset: VersionedAsset, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<VersionedAsset>>;
437
+ public httpRestoreVersionedAssetsById(id: string, vNr: string, versionedAsset: VersionedAsset, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
438
+ if (id === null || id === undefined) {
439
+ throw new Error('Required parameter id was null or undefined when calling httpRestoreVersionedAssetsById.');
440
+ }
441
+ if (vNr === null || vNr === undefined) {
442
+ throw new Error('Required parameter vNr was null or undefined when calling httpRestoreVersionedAssetsById.');
443
+ }
444
+ if (versionedAsset === null || versionedAsset === undefined) {
445
+ throw new Error('Required parameter versionedAsset was null or undefined when calling httpRestoreVersionedAssetsById.');
446
+ }
447
+
448
+ let headers = this.defaultHeaders;
449
+
450
+ let credential: string | undefined;
451
+ // authentication (msal_auth) required
452
+ credential = this.configuration.lookupCredential('msal_auth');
453
+ if (credential) {
454
+ headers = headers.set('Authorization', 'Bearer ' + credential);
455
+ }
456
+
457
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
458
+ if (httpHeaderAcceptSelected === undefined) {
459
+ // to determine the Accept header
460
+ const httpHeaderAccepts: string[] = [
461
+ 'application/json'
462
+ ];
463
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
464
+ }
465
+ if (httpHeaderAcceptSelected !== undefined) {
466
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
467
+ }
468
+
469
+
470
+ // to determine the Content-Type header
471
+ const consumes: string[] = [
472
+ 'application/json'
473
+ ];
474
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
475
+ if (httpContentTypeSelected !== undefined) {
476
+ headers = headers.set('Content-Type', httpContentTypeSelected);
477
+ }
478
+
479
+ let responseType_: 'text' | 'json' = 'json';
480
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
481
+ responseType_ = 'text';
482
+ }
483
+
484
+ return this.httpClient.post<VersionedAsset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versions/${encodeURIComponent(String(vNr))}/restore`,
485
+ versionedAsset,
486
+ {
487
+ responseType: <any>responseType_,
488
+ withCredentials: this.configuration.withCredentials,
489
+ headers: headers,
490
+ observe: observe,
491
+ reportProgress: reportProgress
492
+ }
493
+ );
494
+ }
495
+
496
+ /**
497
+ * This endpoint updates a version of an asset.
498
+ * @param id The ID of the asset.
499
+ * @param vNr The version number of the asset.
500
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
501
+ * @param reportProgress flag to report request and response progress.
502
+ */
503
+ public httpUpdateVersionedAssetsById(id: string, vNr: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
504
+ public httpUpdateVersionedAssetsById(id: string, vNr: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
505
+ public httpUpdateVersionedAssetsById(id: string, vNr: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
506
+ public httpUpdateVersionedAssetsById(id: string, vNr: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
507
+ if (id === null || id === undefined) {
508
+ throw new Error('Required parameter id was null or undefined when calling httpUpdateVersionedAssetsById.');
509
+ }
510
+ if (vNr === null || vNr === undefined) {
511
+ throw new Error('Required parameter vNr was null or undefined when calling httpUpdateVersionedAssetsById.');
512
+ }
513
+
514
+ let headers = this.defaultHeaders;
515
+
516
+ let credential: string | undefined;
517
+ // authentication (msal_auth) required
518
+ credential = this.configuration.lookupCredential('msal_auth');
519
+ if (credential) {
520
+ headers = headers.set('Authorization', 'Bearer ' + credential);
521
+ }
522
+
523
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
524
+ if (httpHeaderAcceptSelected === undefined) {
525
+ // to determine the Accept header
526
+ const httpHeaderAccepts: string[] = [
527
+ 'application/json'
528
+ ];
529
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
530
+ }
531
+ if (httpHeaderAcceptSelected !== undefined) {
532
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
533
+ }
534
+
535
+
536
+ let responseType_: 'text' | 'json' = 'json';
537
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
538
+ responseType_ = 'text';
539
+ }
540
+
541
+ return this.httpClient.post<any>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versions/${encodeURIComponent(String(vNr))}`,
542
+ null,
543
+ {
544
+ responseType: <any>responseType_,
545
+ withCredentials: this.configuration.withCredentials,
546
+ headers: headers,
547
+ observe: observe,
548
+ reportProgress: reportProgress
549
+ }
550
+ );
551
+ }
552
+
553
+ /**
554
+ * This endpoint deletes all versioned asset.
555
+ * @param id The ID of the asset.
556
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
557
+ * @param reportProgress flag to report request and response progress.
558
+ */
559
+ public httpVersionedAssetsDeleteAll(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
560
+ public httpVersionedAssetsDeleteAll(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
561
+ public httpVersionedAssetsDeleteAll(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
562
+ public httpVersionedAssetsDeleteAll(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
563
+ if (id === null || id === undefined) {
564
+ throw new Error('Required parameter id was null or undefined when calling httpVersionedAssetsDeleteAll.');
565
+ }
566
+
567
+ let headers = this.defaultHeaders;
568
+
569
+ let credential: string | undefined;
570
+ // authentication (msal_auth) required
571
+ credential = this.configuration.lookupCredential('msal_auth');
572
+ if (credential) {
573
+ headers = headers.set('Authorization', 'Bearer ' + credential);
574
+ }
575
+
576
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
577
+ if (httpHeaderAcceptSelected === undefined) {
578
+ // to determine the Accept header
579
+ const httpHeaderAccepts: string[] = [
580
+ 'application/json'
581
+ ];
582
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
583
+ }
584
+ if (httpHeaderAcceptSelected !== undefined) {
585
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
586
+ }
587
+
588
+
589
+ let responseType_: 'text' | 'json' = 'json';
590
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
591
+ responseType_ = 'text';
592
+ }
593
+
594
+ return this.httpClient.delete<any>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versions`,
595
+ {
596
+ responseType: <any>responseType_,
597
+ withCredentials: this.configuration.withCredentials,
598
+ headers: headers,
599
+ observe: observe,
600
+ reportProgress: reportProgress
601
+ }
602
+ );
603
+ }
604
+
605
+ /**
606
+ * This endpoint lists all the versioned assets which are stored in the database if asset is still valid.
607
+ * @param id The ID of the asset.
608
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
609
+ * @param reportProgress flag to report request and response progress.
610
+ */
611
+ public httpVersionedAssetsGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<VersionEntity>;
612
+ public httpVersionedAssetsGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<VersionEntity>>;
613
+ public httpVersionedAssetsGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<VersionEntity>>;
614
+ public httpVersionedAssetsGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
615
+ if (id === null || id === undefined) {
616
+ throw new Error('Required parameter id was null or undefined when calling httpVersionedAssetsGet.');
617
+ }
618
+
619
+ let headers = this.defaultHeaders;
620
+
621
+ let credential: string | undefined;
622
+ // authentication (msal_auth) required
623
+ credential = this.configuration.lookupCredential('msal_auth');
624
+ if (credential) {
625
+ headers = headers.set('Authorization', 'Bearer ' + credential);
626
+ }
627
+
628
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
629
+ if (httpHeaderAcceptSelected === undefined) {
630
+ // to determine the Accept header
631
+ const httpHeaderAccepts: string[] = [
632
+ 'application/json'
633
+ ];
634
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
635
+ }
636
+ if (httpHeaderAcceptSelected !== undefined) {
637
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
638
+ }
639
+
640
+
641
+ let responseType_: 'text' | 'json' = 'json';
642
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
643
+ responseType_ = 'text';
644
+ }
645
+
646
+ return this.httpClient.get<VersionEntity>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/versions`,
647
+ {
648
+ responseType: <any>responseType_,
649
+ withCredentials: this.configuration.withCredentials,
650
+ headers: headers,
651
+ observe: observe,
652
+ reportProgress: reportProgress
653
+ }
654
+ );
655
+ }
656
+
657
+ }