@agravity/private 5.3.0 → 5.3.2

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 (117) hide show
  1. package/README.md +2 -2
  2. package/api/api.ts +101 -67
  3. package/api/assetIconRuleManagement.agravity.ts +434 -400
  4. package/api/assetManagement.agravity.ts +856 -737
  5. package/api/assetOperations.agravity.ts +1415 -1309
  6. package/api/assetPublishing.agravity.ts +549 -511
  7. package/api/assetVersioning.agravity.ts +707 -657
  8. package/api/authenticationManagement.agravity.ts +473 -502
  9. package/api/collectionManagement.agravity.ts +731 -618
  10. package/api/collectionSharing.agravity.ts +359 -329
  11. package/api/collectionTypeItemBlueprintManagement.agravity.ts +373 -340
  12. package/api/collectionTypeManagement.agravity.ts +609 -533
  13. package/api/configurationManagement.agravity.ts +316 -311
  14. package/api/downloadFormatManagement.agravity.ts +440 -400
  15. package/api/downloadZip.agravity.ts +149 -151
  16. package/api/generalManagement.agravity.ts +328 -348
  17. package/api/helperTools.agravity.ts +619 -682
  18. package/api/historyEntryManagement.agravity.ts +149 -139
  19. package/api/iccProfileManagement.agravity.ts +123 -134
  20. package/api/listBlobs.agravity.ts +168 -185
  21. package/api/listQueues.agravity.ts +123 -134
  22. package/api/permissionsManagement.agravity.ts +276 -262
  23. package/api/publishing.agravity.ts +160 -148
  24. package/api/quickshareManagement.agravity.ts +378 -385
  25. package/api/savedSearchManagement.agravity.ts +293 -271
  26. package/api/searchManagement.agravity.ts +365 -345
  27. package/api/secureUpload.agravity.ts +375 -371
  28. package/api/signalRConnectionManagement.agravity.ts +200 -218
  29. package/api/staticDefinedListManagement.agravity.ts +457 -408
  30. package/api/stockImport.agravity.ts +242 -221
  31. package/api/structureImport.agravity.ts +126 -137
  32. package/api/translationManagement.agravity.ts +490 -404
  33. package/api/webAppData.agravity.ts +274 -300
  34. package/api/wordpressManagement.agravity.ts +326 -282
  35. package/api/workspaceManagement.agravity.ts +543 -513
  36. package/api.module.ts +61 -63
  37. package/configuration.ts +125 -130
  38. package/encoder.ts +20 -20
  39. package/index.ts +5 -5
  40. package/model/agravityErrorResponse.agravity.ts +17 -19
  41. package/model/agravityInfoResponse.agravity.ts +17 -19
  42. package/model/agravityUser.agravity.ts +35 -37
  43. package/model/agravityVersion.agravity.ts +22 -24
  44. package/model/allWebAppData.agravity.ts +22 -24
  45. package/model/apiKeyResponse.agravity.ts +16 -18
  46. package/model/appConfigTableEntity.agravity.ts +23 -25
  47. package/model/artificialIntelligenceGroup.agravity.ts +18 -20
  48. package/model/asset.agravity.ts +45 -47
  49. package/model/assetAvailability.agravity.ts +17 -19
  50. package/model/assetBlob.agravity.ts +79 -82
  51. package/model/assetBulkUpdate.agravity.ts +18 -20
  52. package/model/assetCollectionLink.agravity.ts +16 -18
  53. package/model/assetIconRule.agravity.ts +33 -35
  54. package/model/assetIdFormat.agravity.ts +17 -19
  55. package/model/assetPageResult.agravity.ts +21 -23
  56. package/model/assetsOperationBody.agravity.ts +18 -20
  57. package/model/azSearchOptions.agravity.ts +23 -25
  58. package/model/azureIdentity.agravity.ts +27 -30
  59. package/model/blobInfoObj.agravity.ts +21 -23
  60. package/model/collTypeItem.agravity.ts +36 -38
  61. package/model/collTypeItemBlueprint.agravity.ts +29 -31
  62. package/model/collection.agravity.ts +33 -35
  63. package/model/collectionType.agravity.ts +33 -35
  64. package/model/collectionUDL.agravity.ts +19 -21
  65. package/model/createSftpUserResult.agravity.ts +16 -18
  66. package/model/dataResult.agravity.ts +20 -22
  67. package/model/distZipResponse.agravity.ts +17 -19
  68. package/model/downloadFormat.agravity.ts +32 -34
  69. package/model/downloadObject.agravity.ts +30 -32
  70. package/model/downloadZipRequest.agravity.ts +23 -25
  71. package/model/dynamicImageOperation.agravity.ts +16 -18
  72. package/model/emailAddress.agravity.ts +16 -18
  73. package/model/entityId.agravity.ts +15 -17
  74. package/model/entityIdName.agravity.ts +17 -19
  75. package/model/entityTranslations.agravity.ts +16 -18
  76. package/model/frontendAppConfig.agravity.ts +19 -21
  77. package/model/groupAllAppData.agravity.ts +24 -26
  78. package/model/historyEntry.agravity.ts +40 -43
  79. package/model/infoEntitySkillEnhanced.agravity.ts +23 -25
  80. package/model/metadata.agravity.ts +17 -19
  81. package/model/models.ts +73 -73
  82. package/model/moveCollectionBody.agravity.ts +17 -19
  83. package/model/permissionChange.agravity.ts +26 -29
  84. package/model/permissionSetting.agravity.ts +25 -27
  85. package/model/publishEntity.agravity.ts +26 -28
  86. package/model/publishedAsset.agravity.ts +23 -25
  87. package/model/quickShare.agravity.ts +30 -32
  88. package/model/quickShareFull.agravity.ts +35 -37
  89. package/model/sasToken.agravity.ts +20 -22
  90. package/model/savedSearch.agravity.ts +29 -31
  91. package/model/searchAdminDataSourceStatus.agravity.ts +16 -18
  92. package/model/searchAdminIndexStatus.agravity.ts +18 -20
  93. package/model/searchAdminIndexerLastRun.agravity.ts +19 -21
  94. package/model/searchAdminIndexerStatus.agravity.ts +18 -20
  95. package/model/searchAdminSkillStatus.agravity.ts +16 -18
  96. package/model/searchAdminStatistics.agravity.ts +16 -18
  97. package/model/searchAdminStatus.agravity.ts +22 -24
  98. package/model/searchFacet.agravity.ts +17 -19
  99. package/model/searchFacetEntity.agravity.ts +17 -19
  100. package/model/searchResult.agravity.ts +21 -23
  101. package/model/searchableItem.agravity.ts +24 -26
  102. package/model/secureUploadEntity.agravity.ts +25 -27
  103. package/model/sharedAsset.agravity.ts +23 -25
  104. package/model/sharedCollection.agravity.ts +22 -24
  105. package/model/sharedCollectionFull.agravity.ts +27 -29
  106. package/model/signalRConnectionInfo.agravity.ts +16 -18
  107. package/model/simpleAsset.agravity.ts +24 -26
  108. package/model/staticDefinedList.agravity.ts +28 -30
  109. package/model/uiTutorials.agravity.ts +23 -26
  110. package/model/versionEntity.agravity.ts +26 -28
  111. package/model/versionedAsset.agravity.ts +18 -20
  112. package/model/whereParam.agravity.ts +40 -43
  113. package/model/workspace.agravity.ts +32 -34
  114. package/ng-package.json +6 -6
  115. package/package.json +45 -45
  116. package/tsconfig.json +20 -28
  117. package/variables.ts +9 -9
@@ -1,371 +1,375 @@
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.3.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 { ApiKeyResponse } from '../model/models';
22
- import { SecureUploadEntity } from '../model/models';
23
-
24
- import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
25
- import { AgravityConfiguration } from '../configuration';
26
-
27
-
28
-
29
- @Injectable({
30
- providedIn: 'root'
31
- })
32
- export class SecureUploadService {
33
-
34
- protected basePath = 'http://localhost:7071/api';
35
- public defaultHeaders = new HttpHeaders();
36
- public configuration = new AgravityConfiguration();
37
- public encoder: HttpParameterCodec;
38
-
39
- constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityConfiguration) {
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
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
54
- if (typeof value === "object" && value instanceof Date === false) {
55
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
56
- } else {
57
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
58
- }
59
- return httpParams;
60
- }
61
-
62
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
63
- if (value == null) {
64
- return httpParams;
65
- }
66
-
67
- if (typeof value === "object") {
68
- if (Array.isArray(value)) {
69
- (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
70
- } else if (value instanceof Date) {
71
- if (key != null) {
72
- httpParams = httpParams.append(key,
73
- (value as Date).toISOString().substr(0, 10));
74
- } else {
75
- throw Error("key may not be null if value is Date");
76
- }
77
- } else {
78
- Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
79
- httpParams, value[k], key != null ? `${key}.${k}` : k));
80
- }
81
- } else if (key != null) {
82
- httpParams = httpParams.append(key, value);
83
- } else {
84
- throw Error("key may not be null if value is not object or array");
85
- }
86
- return httpParams;
87
- }
88
-
89
- /**
90
- * Returns the API Key of a secure upload
91
- * @param id The ID of the secure upload collection.
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 httpGetSecureUploadApiKeyById(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<ApiKeyResponse>;
96
- public httpGetSecureUploadApiKeyById(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<ApiKeyResponse>>;
97
- public httpGetSecureUploadApiKeyById(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<ApiKeyResponse>>;
98
- public httpGetSecureUploadApiKeyById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
99
- if (id === null || id === undefined) {
100
- throw new Error('Required parameter id was null or undefined when calling httpGetSecureUploadApiKeyById.');
101
- }
102
-
103
- let headers = this.defaultHeaders;
104
-
105
- let credential: string | undefined;
106
- // authentication (msal_auth) required
107
- credential = this.configuration.lookupCredential('msal_auth');
108
- if (credential) {
109
- headers = headers.set('Authorization', 'Bearer ' + credential);
110
- }
111
-
112
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
113
- if (httpHeaderAcceptSelected === undefined) {
114
- // to determine the Accept header
115
- const httpHeaderAccepts: string[] = [
116
- 'application/json'
117
- ];
118
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
119
- }
120
- if (httpHeaderAcceptSelected !== undefined) {
121
- headers = headers.set('Accept', httpHeaderAcceptSelected);
122
- }
123
-
124
-
125
- let responseType_: 'text' | 'json' = 'json';
126
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
127
- responseType_ = 'text';
128
- }
129
-
130
- return this.httpClient.get<ApiKeyResponse>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}/apikey`,
131
- {
132
- responseType: <any>responseType_,
133
- withCredentials: this.configuration.withCredentials,
134
- headers: headers,
135
- observe: observe,
136
- reportProgress: reportProgress
137
- }
138
- );
139
- }
140
-
141
- /**
142
- * This lists the secure upload collection which are stored in the database for a specific user (Taken from Bearer token).
143
- * @param collectionid (optional) The ID of the collection where this secure upload should be filtered.
144
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
145
- * @param reportProgress flag to report request and response progress.
146
- */
147
- public httpGetSecureUploadListOfUser(collectionid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<SecureUploadEntity>>;
148
- public httpGetSecureUploadListOfUser(collectionid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<SecureUploadEntity>>>;
149
- public httpGetSecureUploadListOfUser(collectionid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<SecureUploadEntity>>>;
150
- public httpGetSecureUploadListOfUser(collectionid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
151
-
152
- let queryParameters = new HttpParams({encoder: this.encoder});
153
- if (collectionid !== undefined && collectionid !== null) {
154
- queryParameters = this.addToHttpParams(queryParameters,
155
- <any>collectionid, 'collectionid');
156
- }
157
-
158
- let headers = this.defaultHeaders;
159
-
160
- let credential: string | undefined;
161
- // authentication (msal_auth) required
162
- credential = this.configuration.lookupCredential('msal_auth');
163
- if (credential) {
164
- headers = headers.set('Authorization', 'Bearer ' + credential);
165
- }
166
-
167
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
168
- if (httpHeaderAcceptSelected === undefined) {
169
- // to determine the Accept header
170
- const httpHeaderAccepts: string[] = [
171
- 'application/json'
172
- ];
173
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
174
- }
175
- if (httpHeaderAcceptSelected !== undefined) {
176
- headers = headers.set('Accept', httpHeaderAcceptSelected);
177
- }
178
-
179
-
180
- let responseType_: 'text' | 'json' = 'json';
181
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
182
- responseType_ = 'text';
183
- }
184
-
185
- return this.httpClient.get<Array<SecureUploadEntity>>(`${this.configuration.basePath}/secureupload`,
186
- {
187
- params: queryParameters,
188
- responseType: <any>responseType_,
189
- withCredentials: this.configuration.withCredentials,
190
- headers: headers,
191
- observe: observe,
192
- reportProgress: reportProgress
193
- }
194
- );
195
- }
196
-
197
- /**
198
- * Creates an secure upload entry point for a collection
199
- * @param secureUploadEntity This creates / adds an unique secure upload collection ID and adds the information to the collection (in DB).
200
- * @param sftpenabled Used to enable sftp secure file upload
201
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
202
- * @param reportProgress flag to report request and response progress.
203
- */
204
- public httpSecureUploadCreateForUser(secureUploadEntity: SecureUploadEntity, sftpenabled?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<SecureUploadEntity>;
205
- public httpSecureUploadCreateForUser(secureUploadEntity: SecureUploadEntity, sftpenabled?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<SecureUploadEntity>>;
206
- public httpSecureUploadCreateForUser(secureUploadEntity: SecureUploadEntity, sftpenabled?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<SecureUploadEntity>>;
207
- public httpSecureUploadCreateForUser(secureUploadEntity: SecureUploadEntity, sftpenabled?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
208
- if (secureUploadEntity === null || secureUploadEntity === undefined) {
209
- throw new Error('Required parameter secureUploadEntity was null or undefined when calling httpSecureUploadCreateForUser.');
210
- }
211
-
212
- let queryParameters = new HttpParams({encoder: this.encoder});
213
- if (sftpenabled !== undefined && sftpenabled !== null) {
214
- queryParameters = this.addToHttpParams(queryParameters,
215
- <any>sftpenabled, 'sftpenabled');
216
- }
217
-
218
- let headers = this.defaultHeaders;
219
-
220
- let credential: string | undefined;
221
- // authentication (msal_auth) required
222
- credential = this.configuration.lookupCredential('msal_auth');
223
- if (credential) {
224
- headers = headers.set('Authorization', 'Bearer ' + credential);
225
- }
226
-
227
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
228
- if (httpHeaderAcceptSelected === undefined) {
229
- // to determine the Accept header
230
- const httpHeaderAccepts: string[] = [
231
- 'application/json'
232
- ];
233
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
234
- }
235
- if (httpHeaderAcceptSelected !== undefined) {
236
- headers = headers.set('Accept', httpHeaderAcceptSelected);
237
- }
238
-
239
-
240
- // to determine the Content-Type header
241
- const consumes: string[] = [
242
- 'application/json'
243
- ];
244
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
245
- if (httpContentTypeSelected !== undefined) {
246
- headers = headers.set('Content-Type', httpContentTypeSelected);
247
- }
248
-
249
- let responseType_: 'text' | 'json' = 'json';
250
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
251
- responseType_ = 'text';
252
- }
253
-
254
- return this.httpClient.post<SecureUploadEntity>(`${this.configuration.basePath}/secureupload`,
255
- secureUploadEntity,
256
- {
257
- params: queryParameters,
258
- responseType: <any>responseType_,
259
- withCredentials: this.configuration.withCredentials,
260
- headers: headers,
261
- observe: observe,
262
- reportProgress: reportProgress
263
- }
264
- );
265
- }
266
-
267
- /**
268
- * Returns one single secure upload entity from ID
269
- * @param id The ID of the secure upload collection.
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 httpSecureUploadEntityCheckById(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<SecureUploadEntity>;
274
- public httpSecureUploadEntityCheckById(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<SecureUploadEntity>>;
275
- public httpSecureUploadEntityCheckById(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<SecureUploadEntity>>;
276
- public httpSecureUploadEntityCheckById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
277
- if (id === null || id === undefined) {
278
- throw new Error('Required parameter id was null or undefined when calling httpSecureUploadEntityCheckById.');
279
- }
280
-
281
- let headers = this.defaultHeaders;
282
-
283
- let credential: string | undefined;
284
- // authentication (msal_auth) required
285
- credential = this.configuration.lookupCredential('msal_auth');
286
- if (credential) {
287
- headers = headers.set('Authorization', 'Bearer ' + credential);
288
- }
289
-
290
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
291
- if (httpHeaderAcceptSelected === undefined) {
292
- // to determine the Accept header
293
- const httpHeaderAccepts: string[] = [
294
- 'application/json'
295
- ];
296
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
297
- }
298
- if (httpHeaderAcceptSelected !== undefined) {
299
- headers = headers.set('Accept', httpHeaderAcceptSelected);
300
- }
301
-
302
-
303
- let responseType_: 'text' | 'json' = 'json';
304
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
305
- responseType_ = 'text';
306
- }
307
-
308
- return this.httpClient.get<SecureUploadEntity>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}`,
309
- {
310
- responseType: <any>responseType_,
311
- withCredentials: this.configuration.withCredentials,
312
- headers: headers,
313
- observe: observe,
314
- reportProgress: reportProgress
315
- }
316
- );
317
- }
318
-
319
- /**
320
- * Deletes (&#x3D; disables) the secure upload to collection with the given ID.
321
- * @param id The ID of the secure upload collection.
322
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
323
- * @param reportProgress flag to report request and response progress.
324
- */
325
- public httpSecureUploadToCollectionsDeleteById(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>;
326
- public httpSecureUploadToCollectionsDeleteById(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>;
327
- public httpSecureUploadToCollectionsDeleteById(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>;
328
- public httpSecureUploadToCollectionsDeleteById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
329
- if (id === null || id === undefined) {
330
- throw new Error('Required parameter id was null or undefined when calling httpSecureUploadToCollectionsDeleteById.');
331
- }
332
-
333
- let headers = this.defaultHeaders;
334
-
335
- let credential: string | undefined;
336
- // authentication (msal_auth) required
337
- credential = this.configuration.lookupCredential('msal_auth');
338
- if (credential) {
339
- headers = headers.set('Authorization', 'Bearer ' + credential);
340
- }
341
-
342
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
343
- if (httpHeaderAcceptSelected === undefined) {
344
- // to determine the Accept header
345
- const httpHeaderAccepts: string[] = [
346
- 'application/json'
347
- ];
348
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
349
- }
350
- if (httpHeaderAcceptSelected !== undefined) {
351
- headers = headers.set('Accept', httpHeaderAcceptSelected);
352
- }
353
-
354
-
355
- let responseType_: 'text' | 'json' = 'json';
356
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
357
- responseType_ = 'text';
358
- }
359
-
360
- return this.httpClient.delete<any>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}`,
361
- {
362
- responseType: <any>responseType_,
363
- withCredentials: this.configuration.withCredentials,
364
- headers: headers,
365
- observe: observe,
366
- reportProgress: reportProgress
367
- }
368
- );
369
- }
370
-
371
- }
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.3.2
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, HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
16
+ import { CustomHttpParameterCodec } from '../encoder';
17
+ import { Observable } from 'rxjs';
18
+
19
+ import { AgravityErrorResponse } from '../model/models';
20
+ import { ApiKeyResponse } from '../model/models';
21
+ import { SecureUploadEntity } from '../model/models';
22
+
23
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
24
+ import { AgravityConfiguration } from '../configuration';
25
+
26
+ @Injectable({
27
+ providedIn: 'root'
28
+ })
29
+ export class SecureUploadService {
30
+ protected basePath = 'http://localhost:7071/api';
31
+ public defaultHeaders = new HttpHeaders();
32
+ public configuration = new AgravityConfiguration();
33
+ public encoder: HttpParameterCodec;
34
+
35
+ constructor(
36
+ protected httpClient: HttpClient,
37
+ @Optional() @Inject(BASE_PATH) basePath: string,
38
+ @Optional() configuration: AgravityConfiguration
39
+ ) {
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
+ 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, (value as Date).toISOString().substr(0, 10));
72
+ } else {
73
+ throw Error('key may not be null if value is Date');
74
+ }
75
+ } else {
76
+ Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
77
+ }
78
+ } else if (key != null) {
79
+ httpParams = httpParams.append(key, value);
80
+ } else {
81
+ throw Error('key may not be null if value is not object or array');
82
+ }
83
+ return httpParams;
84
+ }
85
+
86
+ /**
87
+ * Returns the API Key of a secure upload
88
+ * @param id The ID of the secure upload collection.
89
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
90
+ * @param reportProgress flag to report request and response progress.
91
+ */
92
+ public httpGetSecureUploadApiKeyById(id: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<ApiKeyResponse>;
93
+ public httpGetSecureUploadApiKeyById(id: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<ApiKeyResponse>>;
94
+ public httpGetSecureUploadApiKeyById(id: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<ApiKeyResponse>>;
95
+ public httpGetSecureUploadApiKeyById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
96
+ if (id === null || id === undefined) {
97
+ throw new Error('Required parameter id was null or undefined when calling httpGetSecureUploadApiKeyById.');
98
+ }
99
+
100
+ let headers = this.defaultHeaders;
101
+
102
+ let credential: string | undefined;
103
+ // authentication (msal_auth) required
104
+ credential = this.configuration.lookupCredential('msal_auth');
105
+ if (credential) {
106
+ headers = headers.set('Authorization', 'Bearer ' + credential);
107
+ }
108
+
109
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
110
+ if (httpHeaderAcceptSelected === undefined) {
111
+ // to determine the Accept header
112
+ const httpHeaderAccepts: string[] = ['application/json'];
113
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
114
+ }
115
+ if (httpHeaderAcceptSelected !== undefined) {
116
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
117
+ }
118
+
119
+ let responseType_: 'text' | 'json' = 'json';
120
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
121
+ responseType_ = 'text';
122
+ }
123
+
124
+ return this.httpClient.get<ApiKeyResponse>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}/apikey`, {
125
+ responseType: <any>responseType_,
126
+ withCredentials: this.configuration.withCredentials,
127
+ headers: headers,
128
+ observe: observe,
129
+ reportProgress: reportProgress
130
+ });
131
+ }
132
+
133
+ /**
134
+ * This lists the secure upload collection which are stored in the database for a specific user (Taken from Bearer token).
135
+ * @param collectionid (optional) The ID of the collection where this secure upload should be filtered.
136
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
137
+ * @param reportProgress flag to report request and response progress.
138
+ */
139
+ public httpGetSecureUploadListOfUser(collectionid?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<Array<SecureUploadEntity>>;
140
+ public httpGetSecureUploadListOfUser(
141
+ collectionid?: string,
142
+ observe?: 'response',
143
+ reportProgress?: boolean,
144
+ options?: { httpHeaderAccept?: 'application/json' }
145
+ ): Observable<HttpResponse<Array<SecureUploadEntity>>>;
146
+ public httpGetSecureUploadListOfUser(
147
+ collectionid?: string,
148
+ observe?: 'events',
149
+ reportProgress?: boolean,
150
+ options?: { httpHeaderAccept?: 'application/json' }
151
+ ): Observable<HttpEvent<Array<SecureUploadEntity>>>;
152
+ public httpGetSecureUploadListOfUser(collectionid?: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
153
+ let queryParameters = new HttpParams({ encoder: this.encoder });
154
+ if (collectionid !== undefined && collectionid !== null) {
155
+ queryParameters = this.addToHttpParams(queryParameters, <any>collectionid, 'collectionid');
156
+ }
157
+
158
+ let headers = this.defaultHeaders;
159
+
160
+ let credential: string | undefined;
161
+ // authentication (msal_auth) required
162
+ credential = this.configuration.lookupCredential('msal_auth');
163
+ if (credential) {
164
+ headers = headers.set('Authorization', 'Bearer ' + credential);
165
+ }
166
+
167
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
168
+ if (httpHeaderAcceptSelected === undefined) {
169
+ // to determine the Accept header
170
+ const httpHeaderAccepts: string[] = ['application/json'];
171
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
172
+ }
173
+ if (httpHeaderAcceptSelected !== undefined) {
174
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
175
+ }
176
+
177
+ let responseType_: 'text' | 'json' = 'json';
178
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
179
+ responseType_ = 'text';
180
+ }
181
+
182
+ return this.httpClient.get<Array<SecureUploadEntity>>(`${this.configuration.basePath}/secureupload`, {
183
+ params: queryParameters,
184
+ responseType: <any>responseType_,
185
+ withCredentials: this.configuration.withCredentials,
186
+ headers: headers,
187
+ observe: observe,
188
+ reportProgress: reportProgress
189
+ });
190
+ }
191
+
192
+ /**
193
+ * Creates an secure upload entry point for a collection
194
+ * @param secureUploadEntity This creates / adds an unique secure upload collection ID and adds the information to the collection (in DB).
195
+ * @param sftpenabled Used to enable sftp secure file upload
196
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
197
+ * @param reportProgress flag to report request and response progress.
198
+ */
199
+ public httpSecureUploadCreateForUser(
200
+ secureUploadEntity: SecureUploadEntity,
201
+ sftpenabled?: boolean,
202
+ observe?: 'body',
203
+ reportProgress?: boolean,
204
+ options?: { httpHeaderAccept?: 'application/json' }
205
+ ): Observable<SecureUploadEntity>;
206
+ public httpSecureUploadCreateForUser(
207
+ secureUploadEntity: SecureUploadEntity,
208
+ sftpenabled?: boolean,
209
+ observe?: 'response',
210
+ reportProgress?: boolean,
211
+ options?: { httpHeaderAccept?: 'application/json' }
212
+ ): Observable<HttpResponse<SecureUploadEntity>>;
213
+ public httpSecureUploadCreateForUser(
214
+ secureUploadEntity: SecureUploadEntity,
215
+ sftpenabled?: boolean,
216
+ observe?: 'events',
217
+ reportProgress?: boolean,
218
+ options?: { httpHeaderAccept?: 'application/json' }
219
+ ): Observable<HttpEvent<SecureUploadEntity>>;
220
+ public httpSecureUploadCreateForUser(
221
+ secureUploadEntity: SecureUploadEntity,
222
+ sftpenabled?: boolean,
223
+ observe: any = 'body',
224
+ reportProgress: boolean = false,
225
+ options?: { httpHeaderAccept?: 'application/json' }
226
+ ): Observable<any> {
227
+ if (secureUploadEntity === null || secureUploadEntity === undefined) {
228
+ throw new Error('Required parameter secureUploadEntity was null or undefined when calling httpSecureUploadCreateForUser.');
229
+ }
230
+
231
+ let queryParameters = new HttpParams({ encoder: this.encoder });
232
+ if (sftpenabled !== undefined && sftpenabled !== null) {
233
+ queryParameters = this.addToHttpParams(queryParameters, <any>sftpenabled, 'sftpenabled');
234
+ }
235
+
236
+ let headers = this.defaultHeaders;
237
+
238
+ let credential: string | undefined;
239
+ // authentication (msal_auth) required
240
+ credential = this.configuration.lookupCredential('msal_auth');
241
+ if (credential) {
242
+ headers = headers.set('Authorization', 'Bearer ' + credential);
243
+ }
244
+
245
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
246
+ if (httpHeaderAcceptSelected === undefined) {
247
+ // to determine the Accept header
248
+ const httpHeaderAccepts: string[] = ['application/json'];
249
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
250
+ }
251
+ if (httpHeaderAcceptSelected !== undefined) {
252
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
253
+ }
254
+
255
+ // to determine the Content-Type header
256
+ const consumes: string[] = ['application/json'];
257
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
258
+ if (httpContentTypeSelected !== undefined) {
259
+ headers = headers.set('Content-Type', httpContentTypeSelected);
260
+ }
261
+
262
+ let responseType_: 'text' | 'json' = 'json';
263
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
264
+ responseType_ = 'text';
265
+ }
266
+
267
+ return this.httpClient.post<SecureUploadEntity>(`${this.configuration.basePath}/secureupload`, secureUploadEntity, {
268
+ params: queryParameters,
269
+ responseType: <any>responseType_,
270
+ withCredentials: this.configuration.withCredentials,
271
+ headers: headers,
272
+ observe: observe,
273
+ reportProgress: reportProgress
274
+ });
275
+ }
276
+
277
+ /**
278
+ * Returns one single secure upload entity from ID
279
+ * @param id The ID of the secure upload collection.
280
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
281
+ * @param reportProgress flag to report request and response progress.
282
+ */
283
+ public httpSecureUploadEntityCheckById(id: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<SecureUploadEntity>;
284
+ public httpSecureUploadEntityCheckById(
285
+ id: string,
286
+ observe?: 'response',
287
+ reportProgress?: boolean,
288
+ options?: { httpHeaderAccept?: 'application/json' }
289
+ ): Observable<HttpResponse<SecureUploadEntity>>;
290
+ public httpSecureUploadEntityCheckById(id: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<SecureUploadEntity>>;
291
+ public httpSecureUploadEntityCheckById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
292
+ if (id === null || id === undefined) {
293
+ throw new Error('Required parameter id was null or undefined when calling httpSecureUploadEntityCheckById.');
294
+ }
295
+
296
+ let headers = this.defaultHeaders;
297
+
298
+ let credential: string | undefined;
299
+ // authentication (msal_auth) required
300
+ credential = this.configuration.lookupCredential('msal_auth');
301
+ if (credential) {
302
+ headers = headers.set('Authorization', 'Bearer ' + credential);
303
+ }
304
+
305
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
306
+ if (httpHeaderAcceptSelected === undefined) {
307
+ // to determine the Accept header
308
+ const httpHeaderAccepts: string[] = ['application/json'];
309
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
310
+ }
311
+ if (httpHeaderAcceptSelected !== undefined) {
312
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
313
+ }
314
+
315
+ let responseType_: 'text' | 'json' = 'json';
316
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
317
+ responseType_ = 'text';
318
+ }
319
+
320
+ return this.httpClient.get<SecureUploadEntity>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}`, {
321
+ responseType: <any>responseType_,
322
+ withCredentials: this.configuration.withCredentials,
323
+ headers: headers,
324
+ observe: observe,
325
+ reportProgress: reportProgress
326
+ });
327
+ }
328
+
329
+ /**
330
+ * Deletes (&#x3D; disables) the secure upload to collection with the given ID.
331
+ * @param id The ID of the secure upload collection.
332
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
333
+ * @param reportProgress flag to report request and response progress.
334
+ */
335
+ public httpSecureUploadToCollectionsDeleteById(id: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<any>;
336
+ public httpSecureUploadToCollectionsDeleteById(id: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<any>>;
337
+ public httpSecureUploadToCollectionsDeleteById(id: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<any>>;
338
+ public httpSecureUploadToCollectionsDeleteById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
339
+ if (id === null || id === undefined) {
340
+ throw new Error('Required parameter id was null or undefined when calling httpSecureUploadToCollectionsDeleteById.');
341
+ }
342
+
343
+ let headers = this.defaultHeaders;
344
+
345
+ let credential: string | undefined;
346
+ // authentication (msal_auth) required
347
+ credential = this.configuration.lookupCredential('msal_auth');
348
+ if (credential) {
349
+ headers = headers.set('Authorization', 'Bearer ' + credential);
350
+ }
351
+
352
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
353
+ if (httpHeaderAcceptSelected === undefined) {
354
+ // to determine the Accept header
355
+ const httpHeaderAccepts: string[] = ['application/json'];
356
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
357
+ }
358
+ if (httpHeaderAcceptSelected !== undefined) {
359
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
360
+ }
361
+
362
+ let responseType_: 'text' | 'json' = 'json';
363
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
364
+ responseType_ = 'text';
365
+ }
366
+
367
+ return this.httpClient.delete<any>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}`, {
368
+ responseType: <any>responseType_,
369
+ withCredentials: this.configuration.withCredentials,
370
+ headers: headers,
371
+ observe: observe,
372
+ reportProgress: reportProgress
373
+ });
374
+ }
375
+ }