@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.
- package/.openapi-generator/FILES +2 -3
- package/.openapi-generator/VERSION +1 -1
- package/README.md +29 -4
- package/api/publicAssetManagement.pub.agravity.ts +389 -265
- package/api/publicAssetOperations.pub.agravity.ts +636 -425
- package/api/publicAssetPublishing.pub.agravity.ts +195 -82
- package/api/publicAssetVersioning.pub.agravity.ts +469 -239
- package/api/publicAuthenticationManagement.pub.agravity.ts +66 -24
- package/api/publicCollectionManagement.pub.agravity.ts +525 -295
- package/api/publicCollectionSecureUpload.pub.agravity.ts +142 -69
- package/api/publicCollectionTypeManagement.pub.agravity.ts +211 -95
- package/api/publicConfigurationManagement.pub.agravity.ts +69 -26
- package/api/publicDownloadFormatManagement.pub.agravity.ts +139 -53
- package/api/publicEndpoints.pub.agravity.ts +63 -43
- package/api/publicGeneralManagement.pub.agravity.ts +253 -104
- package/api/publicHelperTools.pub.agravity.ts +270 -106
- package/api/publicPortalManagement.pub.agravity.ts +323 -124
- package/api/publicPublishing.pub.agravity.ts +69 -38
- package/api/publicSavedSearch.pub.agravity.ts +75 -38
- package/api/publicSearchManagement.pub.agravity.ts +265 -194
- package/api/publicSharingManagement.pub.agravity.ts +246 -157
- package/api/publicSignalRConnectionManagement.pub.agravity.ts +68 -24
- package/api/publicStaticDefinedListManagement.pub.agravity.ts +212 -107
- package/api/publicTranslationManagement.pub.agravity.ts +189 -115
- package/api/publicWebAppData.pub.agravity.ts +146 -47
- package/api/publicWorkspaceManagement.pub.agravity.ts +158 -57
- package/api.module.ts +0 -24
- package/configuration.ts +42 -0
- package/git_push.sh +3 -4
- package/index.ts +1 -0
- package/model/agravityErrorResponse.pub.agravity.ts +3 -4
- package/model/{badRequestResult.pub.agravity.ts → agravityInfoResponse.pub.agravity.ts} +4 -3
- package/model/agravityVersion.pub.agravity.ts +8 -9
- package/model/allWebAppData.pub.agravity.ts +4 -5
- package/model/artificialIntelligenceGroup.pub.agravity.ts +3 -4
- package/model/asset.pub.agravity.ts +22 -23
- package/model/assetAvailability.pub.agravity.ts +1 -2
- package/model/assetBlob.pub.agravity.ts +27 -28
- package/model/assetIdFormat.pub.agravity.ts +3 -4
- package/model/assetPageResult.pub.agravity.ts +4 -5
- package/model/azSearchOptions.pub.agravity.ts +8 -9
- package/model/collTypeItem.pub.agravity.ts +16 -17
- package/model/collection.pub.agravity.ts +15 -16
- package/model/collectionType.pub.agravity.ts +14 -15
- package/model/collectionUDL.pub.agravity.ts +4 -5
- package/model/createSftpUserResult.pub.agravity.ts +2 -3
- package/model/dataResult.pub.agravity.ts +4 -5
- package/model/deletedEntities.pub.agravity.ts +4 -5
- package/model/distZipResponse.pub.agravity.ts +3 -4
- package/model/downloadFormat.pub.agravity.ts +18 -16
- package/model/dynamicImageOperation.pub.agravity.ts +2 -3
- package/model/entityId.pub.agravity.ts +1 -2
- package/model/entityIdName.pub.agravity.ts +3 -4
- package/model/frontendAppConfig.pub.agravity.ts +0 -1
- package/model/groupAllAppData.pub.agravity.ts +5 -6
- package/model/models.ts +1 -3
- package/model/moveCollectionBody.pub.agravity.ts +3 -4
- package/model/permissionEntity.pub.agravity.ts +1 -2
- package/model/portal.pub.agravity.ts +18 -20
- package/model/portalConfiguration.pub.agravity.ts +23 -25
- package/model/portalLinks.pub.agravity.ts +3 -4
- package/model/portalTheme.pub.agravity.ts +6 -7
- package/model/portalZipRequest.pub.agravity.ts +14 -15
- package/model/publishEntity.pub.agravity.ts +9 -10
- package/model/publishedAsset.pub.agravity.ts +12 -13
- package/model/quickShareFull.pub.agravity.ts +15 -16
- package/model/sasToken.pub.agravity.ts +6 -7
- package/model/savedSearch.pub.agravity.ts +13 -14
- package/model/searchAdminDataSourceStatus.pub.agravity.ts +2 -3
- package/model/searchAdminIndexStatus.pub.agravity.ts +3 -4
- package/model/searchAdminIndexerLastRun.pub.agravity.ts +3 -4
- package/model/searchAdminIndexerStatus.pub.agravity.ts +4 -5
- package/model/searchAdminSkillStatus.pub.agravity.ts +2 -3
- package/model/searchAdminStatistics.pub.agravity.ts +2 -3
- package/model/searchAdminStatus.pub.agravity.ts +4 -5
- package/model/searchFacet.pub.agravity.ts +2 -3
- package/model/searchFacetEntity.pub.agravity.ts +2 -3
- package/model/searchResult.pub.agravity.ts +3 -4
- package/model/searchableItem.pub.agravity.ts +3 -4
- package/model/secureUploadEntity.pub.agravity.ts +10 -11
- package/model/sharedAllowedFormat.pub.agravity.ts +2 -3
- package/model/sharedAsset.pub.agravity.ts +5 -6
- package/model/sharedCollectionFull.pub.agravity.ts +18 -19
- package/model/sharedCollectionZipRequest.pub.agravity.ts +14 -15
- package/model/signalRConnectionInfo.pub.agravity.ts +0 -1
- package/model/staticDefinedList.pub.agravity.ts +12 -13
- package/model/versionEntity.pub.agravity.ts +9 -10
- package/model/versionedAsset.pub.agravity.ts +5 -6
- package/model/whereParam.pub.agravity.ts +0 -1
- package/model/workspace.pub.agravity.ts +14 -15
- package/package.json +16 -17
- package/param.ts +44 -0
- package/model/okResult.pub.agravity.ts +0 -15
- 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,15 +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
|
-
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { DownloadFormat } from '../model/downloadFormat.pub.agravity';
|
|
20
20
|
|
|
21
|
+
// @ts-ignore
|
|
21
22
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
22
23
|
import { AgravityPublicConfiguration } from '../configuration';
|
|
23
24
|
|
|
25
|
+
export interface HttpDownloadFormatsGetAllRequestParams {
|
|
26
|
+
/** The requested language of the response. If not matching it falls back to default language. */
|
|
27
|
+
acceptLanguage?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface HttpDownloadFormatsGetAllFromSharedRequestParams {
|
|
31
|
+
/** This share ID is like an API key. Check on validy (format, expire, collection still availabe). Otherwise StatusCode 403 (Forbidden) is returned. */
|
|
32
|
+
shareId: string;
|
|
33
|
+
/** If shared collection has a password, this header is mandatory. Otherwise StatusCode 403 (Forbidden) is returned. */
|
|
34
|
+
ayPassword?: string;
|
|
35
|
+
/** The requested language of the response. If not matching it falls back to default language. */
|
|
36
|
+
acceptLanguage?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
24
39
|
@Injectable({
|
|
25
40
|
providedIn: 'root'
|
|
26
41
|
})
|
|
@@ -32,13 +47,18 @@ export class PublicDownloadFormatManagementService {
|
|
|
32
47
|
|
|
33
48
|
constructor(
|
|
34
49
|
protected httpClient: HttpClient,
|
|
35
|
-
@Optional() @Inject(BASE_PATH) basePath: string,
|
|
50
|
+
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
|
36
51
|
@Optional() configuration: AgravityPublicConfiguration
|
|
37
52
|
) {
|
|
38
53
|
if (configuration) {
|
|
39
54
|
this.configuration = configuration;
|
|
40
55
|
}
|
|
41
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
|
+
|
|
42
62
|
if (typeof basePath !== 'string') {
|
|
43
63
|
basePath = this.basePath;
|
|
44
64
|
}
|
|
@@ -47,6 +67,7 @@ export class PublicDownloadFormatManagementService {
|
|
|
47
67
|
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
48
68
|
}
|
|
49
69
|
|
|
70
|
+
// @ts-ignore
|
|
50
71
|
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
51
72
|
if (typeof value === 'object' && value instanceof Date === false) {
|
|
52
73
|
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
@@ -66,7 +87,7 @@ export class PublicDownloadFormatManagementService {
|
|
|
66
87
|
(value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
|
|
67
88
|
} else if (value instanceof Date) {
|
|
68
89
|
if (key != null) {
|
|
69
|
-
httpParams = httpParams.append(key, (value as Date).toISOString().
|
|
90
|
+
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
|
70
91
|
} else {
|
|
71
92
|
throw Error('key may not be null if value is Date');
|
|
72
93
|
}
|
|
@@ -83,116 +104,181 @@ export class PublicDownloadFormatManagementService {
|
|
|
83
104
|
|
|
84
105
|
/**
|
|
85
106
|
* This endpoint lists all download formats in database.
|
|
107
|
+
* @param requestParameters
|
|
86
108
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
87
109
|
* @param reportProgress flag to report request and response progress.
|
|
88
110
|
*/
|
|
89
|
-
public httpDownloadFormatsGetAll(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
111
|
+
public httpDownloadFormatsGetAll(
|
|
112
|
+
requestParameters?: HttpDownloadFormatsGetAllRequestParams,
|
|
113
|
+
observe?: 'body',
|
|
114
|
+
reportProgress?: boolean,
|
|
115
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
116
|
+
): Observable<Array<DownloadFormat>>;
|
|
117
|
+
public httpDownloadFormatsGetAll(
|
|
118
|
+
requestParameters?: HttpDownloadFormatsGetAllRequestParams,
|
|
119
|
+
observe?: 'response',
|
|
120
|
+
reportProgress?: boolean,
|
|
121
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
122
|
+
): Observable<HttpResponse<Array<DownloadFormat>>>;
|
|
123
|
+
public httpDownloadFormatsGetAll(
|
|
124
|
+
requestParameters?: HttpDownloadFormatsGetAllRequestParams,
|
|
125
|
+
observe?: 'events',
|
|
126
|
+
reportProgress?: boolean,
|
|
127
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
128
|
+
): Observable<HttpEvent<Array<DownloadFormat>>>;
|
|
129
|
+
public httpDownloadFormatsGetAll(
|
|
130
|
+
requestParameters?: HttpDownloadFormatsGetAllRequestParams,
|
|
131
|
+
observe: any = 'body',
|
|
132
|
+
reportProgress: boolean = false,
|
|
133
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
134
|
+
): Observable<any> {
|
|
135
|
+
const acceptLanguage = requestParameters?.acceptLanguage;
|
|
136
|
+
|
|
137
|
+
let localVarHeaders = this.defaultHeaders;
|
|
138
|
+
if (acceptLanguage !== undefined && acceptLanguage !== null) {
|
|
139
|
+
localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
|
|
140
|
+
}
|
|
94
141
|
|
|
95
|
-
let
|
|
142
|
+
let localVarCredential: string | undefined;
|
|
96
143
|
// authentication (function_key) required
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
|
|
144
|
+
localVarCredential = this.configuration.lookupCredential('function_key');
|
|
145
|
+
if (localVarCredential) {
|
|
146
|
+
localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
|
|
100
147
|
}
|
|
101
148
|
|
|
102
|
-
let
|
|
103
|
-
if (
|
|
149
|
+
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
150
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
104
151
|
// to determine the Accept header
|
|
105
152
|
const httpHeaderAccepts: string[] = ['application/json'];
|
|
106
|
-
|
|
153
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
154
|
+
}
|
|
155
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
156
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
107
157
|
}
|
|
108
|
-
|
|
109
|
-
|
|
158
|
+
|
|
159
|
+
let localVarHttpContext: HttpContext | undefined = options && options.context;
|
|
160
|
+
if (localVarHttpContext === undefined) {
|
|
161
|
+
localVarHttpContext = new HttpContext();
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
let localVarTransferCache: boolean | undefined = options && options.transferCache;
|
|
165
|
+
if (localVarTransferCache === undefined) {
|
|
166
|
+
localVarTransferCache = true;
|
|
110
167
|
}
|
|
111
168
|
|
|
112
|
-
let responseType_: 'text' | 'json' = 'json';
|
|
113
|
-
if (
|
|
114
|
-
|
|
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
|
+
}
|
|
115
178
|
}
|
|
116
179
|
|
|
117
|
-
|
|
180
|
+
let localVarPath = `/downloadformats`;
|
|
181
|
+
return this.httpClient.request<Array<DownloadFormat>>('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
182
|
+
context: localVarHttpContext,
|
|
118
183
|
responseType: <any>responseType_,
|
|
119
184
|
withCredentials: this.configuration.withCredentials,
|
|
120
|
-
headers:
|
|
185
|
+
headers: localVarHeaders,
|
|
121
186
|
observe: observe,
|
|
187
|
+
transferCache: localVarTransferCache,
|
|
122
188
|
reportProgress: reportProgress
|
|
123
189
|
});
|
|
124
190
|
}
|
|
125
191
|
|
|
126
192
|
/**
|
|
127
193
|
* This endpoint lists all download formats for a specific shared collections in database.Needs a valid shared collection ID to be authenticated.
|
|
128
|
-
* @param
|
|
129
|
-
* @param ayPassword If shared collection has a password, this header is mandatory. Otherwise StatusCode 403 (Forbidden) is returned.
|
|
194
|
+
* @param requestParameters
|
|
130
195
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
131
196
|
* @param reportProgress flag to report request and response progress.
|
|
132
197
|
*/
|
|
133
198
|
public httpDownloadFormatsGetAllFromShared(
|
|
134
|
-
|
|
135
|
-
ayPassword?: string,
|
|
199
|
+
requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
|
|
136
200
|
observe?: 'body',
|
|
137
201
|
reportProgress?: boolean,
|
|
138
|
-
options?: { httpHeaderAccept?: 'application/json' }
|
|
202
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
139
203
|
): Observable<Array<DownloadFormat>>;
|
|
140
204
|
public httpDownloadFormatsGetAllFromShared(
|
|
141
|
-
|
|
142
|
-
ayPassword?: string,
|
|
205
|
+
requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
|
|
143
206
|
observe?: 'response',
|
|
144
207
|
reportProgress?: boolean,
|
|
145
|
-
options?: { httpHeaderAccept?: 'application/json' }
|
|
208
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
146
209
|
): Observable<HttpResponse<Array<DownloadFormat>>>;
|
|
147
210
|
public httpDownloadFormatsGetAllFromShared(
|
|
148
|
-
|
|
149
|
-
ayPassword?: string,
|
|
211
|
+
requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
|
|
150
212
|
observe?: 'events',
|
|
151
213
|
reportProgress?: boolean,
|
|
152
|
-
options?: { httpHeaderAccept?: 'application/json' }
|
|
214
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
153
215
|
): Observable<HttpEvent<Array<DownloadFormat>>>;
|
|
154
216
|
public httpDownloadFormatsGetAllFromShared(
|
|
155
|
-
|
|
156
|
-
ayPassword?: string,
|
|
217
|
+
requestParameters?: HttpDownloadFormatsGetAllFromSharedRequestParams,
|
|
157
218
|
observe: any = 'body',
|
|
158
219
|
reportProgress: boolean = false,
|
|
159
|
-
options?: { httpHeaderAccept?: 'application/json' }
|
|
220
|
+
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
160
221
|
): Observable<any> {
|
|
222
|
+
const shareId = requestParameters?.shareId;
|
|
161
223
|
if (shareId === null || shareId === undefined) {
|
|
162
224
|
throw new Error('Required parameter shareId was null or undefined when calling httpDownloadFormatsGetAllFromShared.');
|
|
163
225
|
}
|
|
226
|
+
const ayPassword = requestParameters?.ayPassword;
|
|
227
|
+
const acceptLanguage = requestParameters?.acceptLanguage;
|
|
164
228
|
|
|
165
|
-
let
|
|
229
|
+
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
166
230
|
if (shareId !== undefined && shareId !== null) {
|
|
167
|
-
|
|
231
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>shareId, 'share-id');
|
|
168
232
|
}
|
|
169
233
|
|
|
170
|
-
let
|
|
234
|
+
let localVarHeaders = this.defaultHeaders;
|
|
171
235
|
if (ayPassword !== undefined && ayPassword !== null) {
|
|
172
|
-
|
|
236
|
+
localVarHeaders = localVarHeaders.set('ay-password', String(ayPassword));
|
|
237
|
+
}
|
|
238
|
+
if (acceptLanguage !== undefined && acceptLanguage !== null) {
|
|
239
|
+
localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
|
|
173
240
|
}
|
|
174
241
|
|
|
175
|
-
let
|
|
176
|
-
if (
|
|
242
|
+
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
243
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
177
244
|
// to determine the Accept header
|
|
178
245
|
const httpHeaderAccepts: string[] = ['application/json'];
|
|
179
|
-
|
|
246
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
247
|
+
}
|
|
248
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
249
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
let localVarHttpContext: HttpContext | undefined = options && options.context;
|
|
253
|
+
if (localVarHttpContext === undefined) {
|
|
254
|
+
localVarHttpContext = new HttpContext();
|
|
180
255
|
}
|
|
181
|
-
|
|
182
|
-
|
|
256
|
+
|
|
257
|
+
let localVarTransferCache: boolean | undefined = options && options.transferCache;
|
|
258
|
+
if (localVarTransferCache === undefined) {
|
|
259
|
+
localVarTransferCache = true;
|
|
183
260
|
}
|
|
184
261
|
|
|
185
|
-
let responseType_: 'text' | 'json' = 'json';
|
|
186
|
-
if (
|
|
187
|
-
|
|
262
|
+
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
263
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
264
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
265
|
+
responseType_ = 'text';
|
|
266
|
+
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
267
|
+
responseType_ = 'json';
|
|
268
|
+
} else {
|
|
269
|
+
responseType_ = 'blob';
|
|
270
|
+
}
|
|
188
271
|
}
|
|
189
272
|
|
|
190
|
-
|
|
191
|
-
|
|
273
|
+
let localVarPath = `/downloadformats-shared`;
|
|
274
|
+
return this.httpClient.request<Array<DownloadFormat>>('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
275
|
+
context: localVarHttpContext,
|
|
276
|
+
params: localVarQueryParameters,
|
|
192
277
|
responseType: <any>responseType_,
|
|
193
278
|
withCredentials: this.configuration.withCredentials,
|
|
194
|
-
headers:
|
|
279
|
+
headers: localVarHeaders,
|
|
195
280
|
observe: observe,
|
|
281
|
+
transferCache: localVarTransferCache,
|
|
196
282
|
reportProgress: reportProgress
|
|
197
283
|
});
|
|
198
284
|
}
|
|
@@ -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,15 +11,28 @@
|
|
|
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
|
-
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { AgravityErrorResponse } from '../model/agravityErrorResponse.pub.agravity';
|
|
20
20
|
|
|
21
|
+
// @ts-ignore
|
|
21
22
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
22
23
|
import { AgravityPublicConfiguration } from '../configuration';
|
|
23
24
|
|
|
25
|
+
export interface HttpAssetGetViewForPortalRequestParams {
|
|
26
|
+
/** The ID of the asset. */
|
|
27
|
+
assetId: string;
|
|
28
|
+
/** If the request comes from portal this is the indicator. */
|
|
29
|
+
portalId: string;
|
|
30
|
+
/** The name of the format (download format) or container. */
|
|
31
|
+
format: string;
|
|
32
|
+
/** True if a direct download with file name should be started. */
|
|
33
|
+
download?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
24
36
|
@Injectable({
|
|
25
37
|
providedIn: 'root'
|
|
26
38
|
})
|
|
@@ -32,13 +44,18 @@ export class PublicEndpointsService {
|
|
|
32
44
|
|
|
33
45
|
constructor(
|
|
34
46
|
protected httpClient: HttpClient,
|
|
35
|
-
@Optional() @Inject(BASE_PATH) basePath: string,
|
|
47
|
+
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
|
36
48
|
@Optional() configuration: AgravityPublicConfiguration
|
|
37
49
|
) {
|
|
38
50
|
if (configuration) {
|
|
39
51
|
this.configuration = configuration;
|
|
40
52
|
}
|
|
41
53
|
if (typeof this.configuration.basePath !== 'string') {
|
|
54
|
+
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
|
|
55
|
+
if (firstBasePath != undefined) {
|
|
56
|
+
basePath = firstBasePath;
|
|
57
|
+
}
|
|
58
|
+
|
|
42
59
|
if (typeof basePath !== 'string') {
|
|
43
60
|
basePath = this.basePath;
|
|
44
61
|
}
|
|
@@ -47,6 +64,7 @@ export class PublicEndpointsService {
|
|
|
47
64
|
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
48
65
|
}
|
|
49
66
|
|
|
67
|
+
// @ts-ignore
|
|
50
68
|
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
51
69
|
if (typeof value === 'object' && value instanceof Date === false) {
|
|
52
70
|
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
@@ -66,7 +84,7 @@ export class PublicEndpointsService {
|
|
|
66
84
|
(value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
|
|
67
85
|
} else if (value instanceof Date) {
|
|
68
86
|
if (key != null) {
|
|
69
|
-
httpParams = httpParams.append(key, (value as Date).toISOString().
|
|
87
|
+
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
|
70
88
|
} else {
|
|
71
89
|
throw Error('key may not be null if value is Date');
|
|
72
90
|
}
|
|
@@ -83,91 +101,93 @@ export class PublicEndpointsService {
|
|
|
83
101
|
|
|
84
102
|
/**
|
|
85
103
|
* This endpoint returns the content of an asset which is available in a specific portal (portal_id is \"key\") and returns the blob directly.
|
|
86
|
-
* @param
|
|
87
|
-
* @param portalId If the request comes from portal this is the indicator.
|
|
88
|
-
* @param format The name of the format (download format) or container.
|
|
89
|
-
* @param download True if a direct download with file name should be started.
|
|
104
|
+
* @param requestParameters
|
|
90
105
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
91
106
|
* @param reportProgress flag to report request and response progress.
|
|
92
107
|
*/
|
|
93
108
|
public httpAssetGetViewForPortal(
|
|
94
|
-
|
|
95
|
-
portalId: string,
|
|
96
|
-
format: string,
|
|
97
|
-
download?: string,
|
|
109
|
+
requestParameters?: HttpAssetGetViewForPortalRequestParams,
|
|
98
110
|
observe?: 'body',
|
|
99
111
|
reportProgress?: boolean,
|
|
100
|
-
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json' }
|
|
112
|
+
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
101
113
|
): Observable<Blob>;
|
|
102
114
|
public httpAssetGetViewForPortal(
|
|
103
|
-
|
|
104
|
-
portalId: string,
|
|
105
|
-
format: string,
|
|
106
|
-
download?: string,
|
|
115
|
+
requestParameters?: HttpAssetGetViewForPortalRequestParams,
|
|
107
116
|
observe?: 'response',
|
|
108
117
|
reportProgress?: boolean,
|
|
109
|
-
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json' }
|
|
118
|
+
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
110
119
|
): Observable<HttpResponse<Blob>>;
|
|
111
120
|
public httpAssetGetViewForPortal(
|
|
112
|
-
|
|
113
|
-
portalId: string,
|
|
114
|
-
format: string,
|
|
115
|
-
download?: string,
|
|
121
|
+
requestParameters?: HttpAssetGetViewForPortalRequestParams,
|
|
116
122
|
observe?: 'events',
|
|
117
123
|
reportProgress?: boolean,
|
|
118
|
-
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json' }
|
|
124
|
+
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
119
125
|
): Observable<HttpEvent<Blob>>;
|
|
120
126
|
public httpAssetGetViewForPortal(
|
|
121
|
-
|
|
122
|
-
portalId: string,
|
|
123
|
-
format: string,
|
|
124
|
-
download?: string,
|
|
127
|
+
requestParameters?: HttpAssetGetViewForPortalRequestParams,
|
|
125
128
|
observe: any = 'body',
|
|
126
129
|
reportProgress: boolean = false,
|
|
127
|
-
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json' }
|
|
130
|
+
options?: { httpHeaderAccept?: 'application/octet-stream' | 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
128
131
|
): Observable<any> {
|
|
132
|
+
const assetId = requestParameters?.assetId;
|
|
129
133
|
if (assetId === null || assetId === undefined) {
|
|
130
134
|
throw new Error('Required parameter assetId was null or undefined when calling httpAssetGetViewForPortal.');
|
|
131
135
|
}
|
|
136
|
+
const portalId = requestParameters?.portalId;
|
|
132
137
|
if (portalId === null || portalId === undefined) {
|
|
133
138
|
throw new Error('Required parameter portalId was null or undefined when calling httpAssetGetViewForPortal.');
|
|
134
139
|
}
|
|
140
|
+
const format = requestParameters?.format;
|
|
135
141
|
if (format === null || format === undefined) {
|
|
136
142
|
throw new Error('Required parameter format was null or undefined when calling httpAssetGetViewForPortal.');
|
|
137
143
|
}
|
|
144
|
+
const download = requestParameters?.download;
|
|
138
145
|
|
|
139
|
-
let
|
|
146
|
+
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
140
147
|
if (assetId !== undefined && assetId !== null) {
|
|
141
|
-
|
|
148
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>assetId, 'asset_id');
|
|
142
149
|
}
|
|
143
150
|
if (portalId !== undefined && portalId !== null) {
|
|
144
|
-
|
|
151
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
|
|
145
152
|
}
|
|
146
153
|
if (format !== undefined && format !== null) {
|
|
147
|
-
|
|
154
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>format, 'format');
|
|
148
155
|
}
|
|
149
156
|
if (download !== undefined && download !== null) {
|
|
150
|
-
|
|
157
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>download, 'download');
|
|
151
158
|
}
|
|
152
159
|
|
|
153
|
-
let
|
|
160
|
+
let localVarHeaders = this.defaultHeaders;
|
|
154
161
|
|
|
155
|
-
let
|
|
156
|
-
if (
|
|
162
|
+
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
163
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
157
164
|
// to determine the Accept header
|
|
158
165
|
const httpHeaderAccepts: string[] = ['application/octet-stream', 'application/json'];
|
|
159
|
-
|
|
166
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
160
167
|
}
|
|
161
|
-
if (
|
|
162
|
-
|
|
168
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
169
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
let localVarHttpContext: HttpContext | undefined = options && options.context;
|
|
173
|
+
if (localVarHttpContext === undefined) {
|
|
174
|
+
localVarHttpContext = new HttpContext();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
let localVarTransferCache: boolean | undefined = options && options.transferCache;
|
|
178
|
+
if (localVarTransferCache === undefined) {
|
|
179
|
+
localVarTransferCache = true;
|
|
163
180
|
}
|
|
164
181
|
|
|
165
|
-
|
|
166
|
-
|
|
182
|
+
let localVarPath = `/public/view`;
|
|
183
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
184
|
+
context: localVarHttpContext,
|
|
185
|
+
params: localVarQueryParameters,
|
|
167
186
|
responseType: 'blob',
|
|
168
187
|
withCredentials: this.configuration.withCredentials,
|
|
169
|
-
headers:
|
|
188
|
+
headers: localVarHeaders,
|
|
170
189
|
observe: observe,
|
|
190
|
+
transferCache: localVarTransferCache,
|
|
171
191
|
reportProgress: reportProgress
|
|
172
192
|
});
|
|
173
193
|
}
|