@agravity/public 7.3.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/.openapi-generator/FILES +2 -3
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +29 -4
  4. package/api/publicAssetManagement.pub.agravity.ts +389 -265
  5. package/api/publicAssetOperations.pub.agravity.ts +636 -425
  6. package/api/publicAssetPublishing.pub.agravity.ts +195 -82
  7. package/api/publicAssetVersioning.pub.agravity.ts +469 -239
  8. package/api/publicAuthenticationManagement.pub.agravity.ts +66 -24
  9. package/api/publicCollectionManagement.pub.agravity.ts +525 -295
  10. package/api/publicCollectionSecureUpload.pub.agravity.ts +142 -69
  11. package/api/publicCollectionTypeManagement.pub.agravity.ts +211 -95
  12. package/api/publicConfigurationManagement.pub.agravity.ts +69 -26
  13. package/api/publicDownloadFormatManagement.pub.agravity.ts +139 -53
  14. package/api/publicEndpoints.pub.agravity.ts +63 -43
  15. package/api/publicGeneralManagement.pub.agravity.ts +253 -104
  16. package/api/publicHelperTools.pub.agravity.ts +270 -106
  17. package/api/publicPortalManagement.pub.agravity.ts +323 -124
  18. package/api/publicPublishing.pub.agravity.ts +69 -38
  19. package/api/publicSavedSearch.pub.agravity.ts +75 -38
  20. package/api/publicSearchManagement.pub.agravity.ts +265 -194
  21. package/api/publicSharingManagement.pub.agravity.ts +246 -157
  22. package/api/publicSignalRConnectionManagement.pub.agravity.ts +68 -24
  23. package/api/publicStaticDefinedListManagement.pub.agravity.ts +212 -107
  24. package/api/publicTranslationManagement.pub.agravity.ts +189 -115
  25. package/api/publicWebAppData.pub.agravity.ts +146 -47
  26. package/api/publicWorkspaceManagement.pub.agravity.ts +158 -57
  27. package/api.module.ts +0 -24
  28. package/configuration.ts +42 -0
  29. package/git_push.sh +3 -4
  30. package/index.ts +1 -0
  31. package/model/agravityErrorResponse.pub.agravity.ts +3 -4
  32. package/model/{badRequestResult.pub.agravity.ts → agravityInfoResponse.pub.agravity.ts} +4 -3
  33. package/model/agravityVersion.pub.agravity.ts +8 -9
  34. package/model/allWebAppData.pub.agravity.ts +4 -5
  35. package/model/artificialIntelligenceGroup.pub.agravity.ts +3 -4
  36. package/model/asset.pub.agravity.ts +22 -23
  37. package/model/assetAvailability.pub.agravity.ts +1 -2
  38. package/model/assetBlob.pub.agravity.ts +27 -28
  39. package/model/assetIdFormat.pub.agravity.ts +3 -4
  40. package/model/assetPageResult.pub.agravity.ts +4 -5
  41. package/model/azSearchOptions.pub.agravity.ts +8 -9
  42. package/model/collTypeItem.pub.agravity.ts +16 -17
  43. package/model/collection.pub.agravity.ts +15 -16
  44. package/model/collectionType.pub.agravity.ts +14 -15
  45. package/model/collectionUDL.pub.agravity.ts +4 -5
  46. package/model/createSftpUserResult.pub.agravity.ts +2 -3
  47. package/model/dataResult.pub.agravity.ts +4 -5
  48. package/model/deletedEntities.pub.agravity.ts +4 -5
  49. package/model/distZipResponse.pub.agravity.ts +3 -4
  50. package/model/downloadFormat.pub.agravity.ts +18 -16
  51. package/model/dynamicImageOperation.pub.agravity.ts +2 -3
  52. package/model/entityId.pub.agravity.ts +1 -2
  53. package/model/entityIdName.pub.agravity.ts +3 -4
  54. package/model/frontendAppConfig.pub.agravity.ts +0 -1
  55. package/model/groupAllAppData.pub.agravity.ts +5 -6
  56. package/model/models.ts +1 -3
  57. package/model/moveCollectionBody.pub.agravity.ts +3 -4
  58. package/model/permissionEntity.pub.agravity.ts +1 -2
  59. package/model/portal.pub.agravity.ts +18 -20
  60. package/model/portalConfiguration.pub.agravity.ts +23 -25
  61. package/model/portalLinks.pub.agravity.ts +3 -4
  62. package/model/portalTheme.pub.agravity.ts +6 -7
  63. package/model/portalZipRequest.pub.agravity.ts +14 -15
  64. package/model/publishEntity.pub.agravity.ts +9 -10
  65. package/model/publishedAsset.pub.agravity.ts +12 -13
  66. package/model/quickShareFull.pub.agravity.ts +15 -16
  67. package/model/sasToken.pub.agravity.ts +6 -7
  68. package/model/savedSearch.pub.agravity.ts +13 -14
  69. package/model/searchAdminDataSourceStatus.pub.agravity.ts +2 -3
  70. package/model/searchAdminIndexStatus.pub.agravity.ts +3 -4
  71. package/model/searchAdminIndexerLastRun.pub.agravity.ts +3 -4
  72. package/model/searchAdminIndexerStatus.pub.agravity.ts +4 -5
  73. package/model/searchAdminSkillStatus.pub.agravity.ts +2 -3
  74. package/model/searchAdminStatistics.pub.agravity.ts +2 -3
  75. package/model/searchAdminStatus.pub.agravity.ts +4 -5
  76. package/model/searchFacet.pub.agravity.ts +2 -3
  77. package/model/searchFacetEntity.pub.agravity.ts +2 -3
  78. package/model/searchResult.pub.agravity.ts +3 -4
  79. package/model/searchableItem.pub.agravity.ts +3 -4
  80. package/model/secureUploadEntity.pub.agravity.ts +10 -11
  81. package/model/sharedAllowedFormat.pub.agravity.ts +2 -3
  82. package/model/sharedAsset.pub.agravity.ts +5 -6
  83. package/model/sharedCollectionFull.pub.agravity.ts +18 -19
  84. package/model/sharedCollectionZipRequest.pub.agravity.ts +14 -15
  85. package/model/signalRConnectionInfo.pub.agravity.ts +0 -1
  86. package/model/staticDefinedList.pub.agravity.ts +12 -13
  87. package/model/versionEntity.pub.agravity.ts +9 -10
  88. package/model/versionedAsset.pub.agravity.ts +5 -6
  89. package/model/whereParam.pub.agravity.ts +0 -1
  90. package/model/workspace.pub.agravity.ts +14 -15
  91. package/package.json +16 -17
  92. package/param.ts +44 -0
  93. package/model/okResult.pub.agravity.ts +0 -15
  94. package/model/portalLanguages.pub.agravity.ts +0 -16
@@ -2,7 +2,6 @@
2
2
  * Agravity OpenAPI Documentation - Public Functions
3
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 2024. All Rights Reserved
4
4
  *
5
- * The version of the OpenAPI document: 7.3.1
6
5
  * Contact: office@agravity.io
7
6
  *
8
7
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,17 +11,31 @@
12
11
  /* tslint:disable:no-unused-variable member-ordering */
13
12
 
14
13
  import { Inject, Injectable, Optional } from '@angular/core';
15
- import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
14
+ import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
16
15
  import { CustomHttpParameterCodec } from '../encoder';
17
16
  import { Observable } from 'rxjs';
18
17
 
19
- import { AgravityErrorResponse } from '../model/models';
20
- import { AllWebAppData } from '../model/models';
21
- import { GroupAllAppData } from '../model/models';
18
+ // @ts-ignore
19
+ import { AgravityErrorResponse } from '../model/agravityErrorResponse.pub.agravity';
20
+ // @ts-ignore
21
+ import { AllWebAppData } from '../model/allWebAppData.pub.agravity';
22
+ // @ts-ignore
23
+ import { GroupAllAppData } from '../model/groupAllAppData.pub.agravity';
22
24
 
25
+ // @ts-ignore
23
26
  import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
24
27
  import { AgravityPublicConfiguration } from '../configuration';
25
28
 
29
+ export interface HttpGetDataCollectionTypeRequestParams {
30
+ /** The ID of the collection type for which this web data should be prepared. */
31
+ id: string;
32
+ }
33
+
34
+ export interface HttpGetWebAppDataRequestParams {
35
+ /** The ID of the collection for which this web data should be prepared. */
36
+ id: string;
37
+ }
38
+
26
39
  @Injectable({
27
40
  providedIn: 'root'
28
41
  })
@@ -34,13 +47,18 @@ export class PublicWebAppDataService {
34
47
 
35
48
  constructor(
36
49
  protected httpClient: HttpClient,
37
- @Optional() @Inject(BASE_PATH) basePath: string,
50
+ @Optional() @Inject(BASE_PATH) basePath: string | string[],
38
51
  @Optional() configuration: AgravityPublicConfiguration
39
52
  ) {
40
53
  if (configuration) {
41
54
  this.configuration = configuration;
42
55
  }
43
56
  if (typeof this.configuration.basePath !== 'string') {
57
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
58
+ if (firstBasePath != undefined) {
59
+ basePath = firstBasePath;
60
+ }
61
+
44
62
  if (typeof basePath !== 'string') {
45
63
  basePath = this.basePath;
46
64
  }
@@ -49,6 +67,7 @@ export class PublicWebAppDataService {
49
67
  this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
50
68
  }
51
69
 
70
+ // @ts-ignore
52
71
  private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
53
72
  if (typeof value === 'object' && value instanceof Date === false) {
54
73
  httpParams = this.addToHttpParamsRecursive(httpParams, value);
@@ -68,7 +87,7 @@ export class PublicWebAppDataService {
68
87
  (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
69
88
  } else if (value instanceof Date) {
70
89
  if (key != null) {
71
- httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
90
+ httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
72
91
  } else {
73
92
  throw Error('key may not be null if value is Date');
74
93
  }
@@ -85,94 +104,174 @@ export class PublicWebAppDataService {
85
104
 
86
105
  /**
87
106
  * This returns all collections and assets from the given collection type.
88
- * @param id The ID of the collection type for which this web data should be prepared.
107
+ * @param requestParameters
89
108
  * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
90
109
  * @param reportProgress flag to report request and response progress.
91
110
  */
92
- public httpGetDataCollectionType(id: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<GroupAllAppData>;
93
- public httpGetDataCollectionType(id: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<GroupAllAppData>>;
94
- public httpGetDataCollectionType(id: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<GroupAllAppData>>;
95
- public httpGetDataCollectionType(id: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
111
+ public httpGetDataCollectionType(
112
+ requestParameters?: HttpGetDataCollectionTypeRequestParams,
113
+ observe?: 'body',
114
+ reportProgress?: boolean,
115
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
116
+ ): Observable<GroupAllAppData>;
117
+ public httpGetDataCollectionType(
118
+ requestParameters?: HttpGetDataCollectionTypeRequestParams,
119
+ observe?: 'response',
120
+ reportProgress?: boolean,
121
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
122
+ ): Observable<HttpResponse<GroupAllAppData>>;
123
+ public httpGetDataCollectionType(
124
+ requestParameters?: HttpGetDataCollectionTypeRequestParams,
125
+ observe?: 'events',
126
+ reportProgress?: boolean,
127
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
128
+ ): Observable<HttpEvent<GroupAllAppData>>;
129
+ public httpGetDataCollectionType(
130
+ requestParameters?: HttpGetDataCollectionTypeRequestParams,
131
+ observe: any = 'body',
132
+ reportProgress: boolean = false,
133
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
134
+ ): Observable<any> {
135
+ const id = requestParameters?.id;
96
136
  if (id === null || id === undefined) {
97
137
  throw new Error('Required parameter id was null or undefined when calling httpGetDataCollectionType.');
98
138
  }
99
139
 
100
- let headers = this.defaultHeaders;
140
+ let localVarHeaders = this.defaultHeaders;
101
141
 
102
- let credential: string | undefined;
142
+ let localVarCredential: string | undefined;
103
143
  // authentication (function_key) required
104
- credential = this.configuration.lookupCredential('function_key');
105
- if (credential) {
106
- headers = headers.set('x-functions-key', credential);
144
+ localVarCredential = this.configuration.lookupCredential('function_key');
145
+ if (localVarCredential) {
146
+ localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
107
147
  }
108
148
 
109
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
110
- if (httpHeaderAcceptSelected === undefined) {
149
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
150
+ if (localVarHttpHeaderAcceptSelected === undefined) {
111
151
  // to determine the Accept header
112
152
  const httpHeaderAccepts: string[] = ['application/json'];
113
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
153
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
154
+ }
155
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
156
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
157
+ }
158
+
159
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
160
+ if (localVarHttpContext === undefined) {
161
+ localVarHttpContext = new HttpContext();
114
162
  }
115
- if (httpHeaderAcceptSelected !== undefined) {
116
- headers = headers.set('Accept', httpHeaderAcceptSelected);
163
+
164
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
165
+ if (localVarTransferCache === undefined) {
166
+ localVarTransferCache = true;
117
167
  }
118
168
 
119
- let responseType_: 'text' | 'json' = 'json';
120
- if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
121
- responseType_ = 'text';
169
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
170
+ if (localVarHttpHeaderAcceptSelected) {
171
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
172
+ responseType_ = 'text';
173
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
174
+ responseType_ = 'json';
175
+ } else {
176
+ responseType_ = 'blob';
177
+ }
122
178
  }
123
179
 
124
- return this.httpClient.get<GroupAllAppData>(`${this.configuration.basePath}/data/collectiontype/${encodeURIComponent(String(id))}`, {
180
+ let localVarPath = `/data/collectiontype/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
181
+ return this.httpClient.request<GroupAllAppData>('get', `${this.configuration.basePath}${localVarPath}`, {
182
+ context: localVarHttpContext,
125
183
  responseType: <any>responseType_,
126
184
  withCredentials: this.configuration.withCredentials,
127
- headers: headers,
185
+ headers: localVarHeaders,
128
186
  observe: observe,
187
+ transferCache: localVarTransferCache,
129
188
  reportProgress: reportProgress
130
189
  });
131
190
  }
132
191
 
133
192
  /**
134
193
  * This lists all elements of a given collection which can be used by the web frontend. It includes structure and all assets. All coming live from database.
135
- * @param id The ID of the collection for which this web data should be prepared.
194
+ * @param requestParameters
136
195
  * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
137
196
  * @param reportProgress flag to report request and response progress.
138
197
  */
139
- public httpGetWebAppData(id: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<AllWebAppData>;
140
- public httpGetWebAppData(id: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<AllWebAppData>>;
141
- public httpGetWebAppData(id: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<AllWebAppData>>;
142
- public httpGetWebAppData(id: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
198
+ public httpGetWebAppData(
199
+ requestParameters?: HttpGetWebAppDataRequestParams,
200
+ observe?: 'body',
201
+ reportProgress?: boolean,
202
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
203
+ ): Observable<AllWebAppData>;
204
+ public httpGetWebAppData(
205
+ requestParameters?: HttpGetWebAppDataRequestParams,
206
+ observe?: 'response',
207
+ reportProgress?: boolean,
208
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
209
+ ): Observable<HttpResponse<AllWebAppData>>;
210
+ public httpGetWebAppData(
211
+ requestParameters?: HttpGetWebAppDataRequestParams,
212
+ observe?: 'events',
213
+ reportProgress?: boolean,
214
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
215
+ ): Observable<HttpEvent<AllWebAppData>>;
216
+ public httpGetWebAppData(
217
+ requestParameters?: HttpGetWebAppDataRequestParams,
218
+ observe: any = 'body',
219
+ reportProgress: boolean = false,
220
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
221
+ ): Observable<any> {
222
+ const id = requestParameters?.id;
143
223
  if (id === null || id === undefined) {
144
224
  throw new Error('Required parameter id was null or undefined when calling httpGetWebAppData.');
145
225
  }
146
226
 
147
- let headers = this.defaultHeaders;
227
+ let localVarHeaders = this.defaultHeaders;
148
228
 
149
- let credential: string | undefined;
229
+ let localVarCredential: string | undefined;
150
230
  // authentication (function_key) required
151
- credential = this.configuration.lookupCredential('function_key');
152
- if (credential) {
153
- headers = headers.set('x-functions-key', credential);
231
+ localVarCredential = this.configuration.lookupCredential('function_key');
232
+ if (localVarCredential) {
233
+ localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
154
234
  }
155
235
 
156
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
157
- if (httpHeaderAcceptSelected === undefined) {
236
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
237
+ if (localVarHttpHeaderAcceptSelected === undefined) {
158
238
  // to determine the Accept header
159
239
  const httpHeaderAccepts: string[] = ['application/json'];
160
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
240
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
161
241
  }
162
- if (httpHeaderAcceptSelected !== undefined) {
163
- headers = headers.set('Accept', httpHeaderAcceptSelected);
242
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
243
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
244
+ }
245
+
246
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
247
+ if (localVarHttpContext === undefined) {
248
+ localVarHttpContext = new HttpContext();
164
249
  }
165
250
 
166
- let responseType_: 'text' | 'json' = 'json';
167
- if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
168
- responseType_ = 'text';
251
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
252
+ if (localVarTransferCache === undefined) {
253
+ localVarTransferCache = true;
254
+ }
255
+
256
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
257
+ if (localVarHttpHeaderAcceptSelected) {
258
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
259
+ responseType_ = 'text';
260
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
261
+ responseType_ = 'json';
262
+ } else {
263
+ responseType_ = 'blob';
264
+ }
169
265
  }
170
266
 
171
- return this.httpClient.get<AllWebAppData>(`${this.configuration.basePath}/webappdata/${encodeURIComponent(String(id))}`, {
267
+ let localVarPath = `/webappdata/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
268
+ return this.httpClient.request<AllWebAppData>('get', `${this.configuration.basePath}${localVarPath}`, {
269
+ context: localVarHttpContext,
172
270
  responseType: <any>responseType_,
173
271
  withCredentials: this.configuration.withCredentials,
174
- headers: headers,
272
+ headers: localVarHeaders,
175
273
  observe: observe,
274
+ transferCache: localVarTransferCache,
176
275
  reportProgress: reportProgress
177
276
  });
178
277
  }
@@ -2,7 +2,6 @@
2
2
  * Agravity OpenAPI Documentation - Public Functions
3
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 2024. All Rights Reserved
4
4
  *
5
- * The version of the OpenAPI document: 7.3.1
6
5
  * Contact: office@agravity.io
7
6
  *
8
7
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,16 +11,35 @@
12
11
  /* tslint:disable:no-unused-variable member-ordering */
13
12
 
14
13
  import { Inject, Injectable, Optional } from '@angular/core';
15
- import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
14
+ import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
16
15
  import { CustomHttpParameterCodec } from '../encoder';
17
16
  import { Observable } from 'rxjs';
18
17
 
19
- import { AgravityErrorResponse } from '../model/models';
20
- import { Workspace } from '../model/models';
18
+ // @ts-ignore
19
+ import { AgravityErrorResponse } from '../model/agravityErrorResponse.pub.agravity';
20
+ // @ts-ignore
21
+ import { Workspace } from '../model/workspace.pub.agravity';
21
22
 
23
+ // @ts-ignore
22
24
  import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
23
25
  import { AgravityPublicConfiguration } from '../configuration';
24
26
 
27
+ export interface HttpWorkspacesGetRequestParams {
28
+ /** When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header) */
29
+ translations?: boolean;
30
+ /** The requested language of the response. If not matching it falls back to default language. */
31
+ acceptLanguage?: string;
32
+ }
33
+
34
+ export interface HttpWorkspacesGetByIdRequestParams {
35
+ /** The ID of the workspace. */
36
+ id: string;
37
+ /** When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header) */
38
+ translations?: boolean;
39
+ /** The requested language of the response. If not matching it falls back to default language. */
40
+ acceptLanguage?: string;
41
+ }
42
+
25
43
  @Injectable({
26
44
  providedIn: 'root'
27
45
  })
@@ -33,13 +51,18 @@ export class PublicWorkspaceManagementService {
33
51
 
34
52
  constructor(
35
53
  protected httpClient: HttpClient,
36
- @Optional() @Inject(BASE_PATH) basePath: string,
54
+ @Optional() @Inject(BASE_PATH) basePath: string | string[],
37
55
  @Optional() configuration: AgravityPublicConfiguration
38
56
  ) {
39
57
  if (configuration) {
40
58
  this.configuration = configuration;
41
59
  }
42
60
  if (typeof this.configuration.basePath !== 'string') {
61
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
62
+ if (firstBasePath != undefined) {
63
+ basePath = firstBasePath;
64
+ }
65
+
43
66
  if (typeof basePath !== 'string') {
44
67
  basePath = this.basePath;
45
68
  }
@@ -48,6 +71,7 @@ export class PublicWorkspaceManagementService {
48
71
  this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
49
72
  }
50
73
 
74
+ // @ts-ignore
51
75
  private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
52
76
  if (typeof value === 'object' && value instanceof Date === false) {
53
77
  httpParams = this.addToHttpParamsRecursive(httpParams, value);
@@ -67,7 +91,7 @@ export class PublicWorkspaceManagementService {
67
91
  (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
68
92
  } else if (value instanceof Date) {
69
93
  if (key != null) {
70
- httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
94
+ httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
71
95
  } else {
72
96
  throw Error('key may not be null if value is Date');
73
97
  }
@@ -84,115 +108,192 @@ export class PublicWorkspaceManagementService {
84
108
 
85
109
  /**
86
110
  * This lists all available workspaces which are stored in the database and not deleted (status \&quot;A\&quot;).
87
- * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
111
+ * @param requestParameters
88
112
  * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
89
113
  * @param reportProgress flag to report request and response progress.
90
114
  */
91
- public httpWorkspacesGet(translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<Array<Workspace>>;
92
- public httpWorkspacesGet(translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<Array<Workspace>>>;
93
- public httpWorkspacesGet(translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<Array<Workspace>>>;
94
- public httpWorkspacesGet(translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
95
- let queryParameters = new HttpParams({ encoder: this.encoder });
115
+ public httpWorkspacesGet(
116
+ requestParameters?: HttpWorkspacesGetRequestParams,
117
+ observe?: 'body',
118
+ reportProgress?: boolean,
119
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
120
+ ): Observable<Array<Workspace>>;
121
+ public httpWorkspacesGet(
122
+ requestParameters?: HttpWorkspacesGetRequestParams,
123
+ observe?: 'response',
124
+ reportProgress?: boolean,
125
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
126
+ ): Observable<HttpResponse<Array<Workspace>>>;
127
+ public httpWorkspacesGet(
128
+ requestParameters?: HttpWorkspacesGetRequestParams,
129
+ observe?: 'events',
130
+ reportProgress?: boolean,
131
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
132
+ ): Observable<HttpEvent<Array<Workspace>>>;
133
+ public httpWorkspacesGet(
134
+ requestParameters?: HttpWorkspacesGetRequestParams,
135
+ observe: any = 'body',
136
+ reportProgress: boolean = false,
137
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
138
+ ): Observable<any> {
139
+ const translations = requestParameters?.translations;
140
+ const acceptLanguage = requestParameters?.acceptLanguage;
141
+
142
+ let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
96
143
  if (translations !== undefined && translations !== null) {
97
- queryParameters = this.addToHttpParams(queryParameters, <any>translations, 'translations');
144
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>translations, 'translations');
98
145
  }
99
146
 
100
- let headers = this.defaultHeaders;
147
+ let localVarHeaders = this.defaultHeaders;
148
+ if (acceptLanguage !== undefined && acceptLanguage !== null) {
149
+ localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
150
+ }
101
151
 
102
- let credential: string | undefined;
152
+ let localVarCredential: string | undefined;
103
153
  // authentication (function_key) required
104
- credential = this.configuration.lookupCredential('function_key');
105
- if (credential) {
106
- headers = headers.set('x-functions-key', credential);
154
+ localVarCredential = this.configuration.lookupCredential('function_key');
155
+ if (localVarCredential) {
156
+ localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
107
157
  }
108
158
 
109
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
110
- if (httpHeaderAcceptSelected === undefined) {
159
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
160
+ if (localVarHttpHeaderAcceptSelected === undefined) {
111
161
  // to determine the Accept header
112
162
  const httpHeaderAccepts: string[] = ['application/json'];
113
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
163
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
164
+ }
165
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
166
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
114
167
  }
115
- if (httpHeaderAcceptSelected !== undefined) {
116
- headers = headers.set('Accept', httpHeaderAcceptSelected);
168
+
169
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
170
+ if (localVarHttpContext === undefined) {
171
+ localVarHttpContext = new HttpContext();
117
172
  }
118
173
 
119
- let responseType_: 'text' | 'json' = 'json';
120
- if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
121
- responseType_ = 'text';
174
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
175
+ if (localVarTransferCache === undefined) {
176
+ localVarTransferCache = true;
122
177
  }
123
178
 
124
- return this.httpClient.get<Array<Workspace>>(`${this.configuration.basePath}/workspaces`, {
125
- params: queryParameters,
179
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
180
+ if (localVarHttpHeaderAcceptSelected) {
181
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
182
+ responseType_ = 'text';
183
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
184
+ responseType_ = 'json';
185
+ } else {
186
+ responseType_ = 'blob';
187
+ }
188
+ }
189
+
190
+ let localVarPath = `/workspaces`;
191
+ return this.httpClient.request<Array<Workspace>>('get', `${this.configuration.basePath}${localVarPath}`, {
192
+ context: localVarHttpContext,
193
+ params: localVarQueryParameters,
126
194
  responseType: <any>responseType_,
127
195
  withCredentials: this.configuration.withCredentials,
128
- headers: headers,
196
+ headers: localVarHeaders,
129
197
  observe: observe,
198
+ transferCache: localVarTransferCache,
130
199
  reportProgress: reportProgress
131
200
  });
132
201
  }
133
202
 
134
203
  /**
135
204
  * Returns one single workspace (from ID).
136
- * @param id The ID of the workspace.
137
- * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
205
+ * @param requestParameters
138
206
  * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
139
207
  * @param reportProgress flag to report request and response progress.
140
208
  */
141
- public httpWorkspacesGetById(id: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<Workspace>;
142
209
  public httpWorkspacesGetById(
143
- id: string,
144
- translations?: boolean,
210
+ requestParameters?: HttpWorkspacesGetByIdRequestParams,
211
+ observe?: 'body',
212
+ reportProgress?: boolean,
213
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
214
+ ): Observable<Workspace>;
215
+ public httpWorkspacesGetById(
216
+ requestParameters?: HttpWorkspacesGetByIdRequestParams,
145
217
  observe?: 'response',
146
218
  reportProgress?: boolean,
147
- options?: { httpHeaderAccept?: 'application/json' }
219
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
148
220
  ): Observable<HttpResponse<Workspace>>;
149
221
  public httpWorkspacesGetById(
150
- id: string,
151
- translations?: boolean,
222
+ requestParameters?: HttpWorkspacesGetByIdRequestParams,
152
223
  observe?: 'events',
153
224
  reportProgress?: boolean,
154
- options?: { httpHeaderAccept?: 'application/json' }
225
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
155
226
  ): Observable<HttpEvent<Workspace>>;
156
- public httpWorkspacesGetById(id: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
227
+ public httpWorkspacesGetById(
228
+ requestParameters?: HttpWorkspacesGetByIdRequestParams,
229
+ observe: any = 'body',
230
+ reportProgress: boolean = false,
231
+ options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
232
+ ): Observable<any> {
233
+ const id = requestParameters?.id;
157
234
  if (id === null || id === undefined) {
158
235
  throw new Error('Required parameter id was null or undefined when calling httpWorkspacesGetById.');
159
236
  }
237
+ const translations = requestParameters?.translations;
238
+ const acceptLanguage = requestParameters?.acceptLanguage;
160
239
 
161
- let queryParameters = new HttpParams({ encoder: this.encoder });
240
+ let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
162
241
  if (translations !== undefined && translations !== null) {
163
- queryParameters = this.addToHttpParams(queryParameters, <any>translations, 'translations');
242
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>translations, 'translations');
164
243
  }
165
244
 
166
- let headers = this.defaultHeaders;
245
+ let localVarHeaders = this.defaultHeaders;
246
+ if (acceptLanguage !== undefined && acceptLanguage !== null) {
247
+ localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
248
+ }
167
249
 
168
- let credential: string | undefined;
250
+ let localVarCredential: string | undefined;
169
251
  // authentication (function_key) required
170
- credential = this.configuration.lookupCredential('function_key');
171
- if (credential) {
172
- headers = headers.set('x-functions-key', credential);
252
+ localVarCredential = this.configuration.lookupCredential('function_key');
253
+ if (localVarCredential) {
254
+ localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
173
255
  }
174
256
 
175
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
176
- if (httpHeaderAcceptSelected === undefined) {
257
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
258
+ if (localVarHttpHeaderAcceptSelected === undefined) {
177
259
  // to determine the Accept header
178
260
  const httpHeaderAccepts: string[] = ['application/json'];
179
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
261
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
262
+ }
263
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
264
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
180
265
  }
181
- if (httpHeaderAcceptSelected !== undefined) {
182
- headers = headers.set('Accept', httpHeaderAcceptSelected);
266
+
267
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
268
+ if (localVarHttpContext === undefined) {
269
+ localVarHttpContext = new HttpContext();
183
270
  }
184
271
 
185
- let responseType_: 'text' | 'json' = 'json';
186
- if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
187
- responseType_ = 'text';
272
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
273
+ if (localVarTransferCache === undefined) {
274
+ localVarTransferCache = true;
275
+ }
276
+
277
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
278
+ if (localVarHttpHeaderAcceptSelected) {
279
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
280
+ responseType_ = 'text';
281
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
282
+ responseType_ = 'json';
283
+ } else {
284
+ responseType_ = 'blob';
285
+ }
188
286
  }
189
287
 
190
- return this.httpClient.get<Workspace>(`${this.configuration.basePath}/workspaces/${encodeURIComponent(String(id))}`, {
191
- params: queryParameters,
288
+ let localVarPath = `/workspaces/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
289
+ return this.httpClient.request<Workspace>('get', `${this.configuration.basePath}${localVarPath}`, {
290
+ context: localVarHttpContext,
291
+ params: localVarQueryParameters,
192
292
  responseType: <any>responseType_,
193
293
  withCredentials: this.configuration.withCredentials,
194
- headers: headers,
294
+ headers: localVarHeaders,
195
295
  observe: observe,
296
+ transferCache: localVarTransferCache,
196
297
  reportProgress: reportProgress
197
298
  });
198
299
  }