@agravity/public 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +76 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +203 -0
- package/api/api.ts +43 -0
- package/api/publicAssetManagement.pub.agravity.ts +504 -0
- package/api/publicAssetOperations.pub.agravity.ts +633 -0
- package/api/publicAssetPublishing.pub.agravity.ts +263 -0
- package/api/publicAssetVersioning.pub.agravity.ts +552 -0
- package/api/publicAuthenticationManagement.pub.agravity.ts +135 -0
- package/api/publicCollectionManagement.pub.agravity.ts +562 -0
- package/api/publicCollectionSecureUpload.pub.agravity.ts +229 -0
- package/api/publicCollectionTypeManagement.pub.agravity.ts +266 -0
- package/api/publicConfigurationManagement.pub.agravity.ts +128 -0
- package/api/publicDownloadFormatManagement.pub.agravity.ts +135 -0
- package/api/publicGeneralManagement.pub.agravity.ts +221 -0
- package/api/publicHelperTools.pub.agravity.ts +288 -0
- package/api/publicPublishing.pub.agravity.ts +148 -0
- package/api/publicSavedSearch.pub.agravity.ts +148 -0
- package/api/publicSearchManagement.pub.agravity.ts +197 -0
- package/api/publicSharingManagement.pub.agravity.ts +215 -0
- package/api/publicSignalRConnectionManagement.pub.agravity.ts +136 -0
- package/api/publicStaticDefinedListManagement.pub.agravity.ts +203 -0
- package/api/publicTranslationManagement.pub.agravity.ts +267 -0
- package/api/publicWebAppData.pub.agravity.ts +193 -0
- package/api/publicWorkspaceManagement.pub.agravity.ts +204 -0
- package/api.module.ts +51 -0
- package/configuration.ts +132 -0
- package/encoder.ts +20 -0
- package/git_push.sh +58 -0
- package/index.ts +5 -0
- package/model/agravityErrorResponse.pub.agravity.ts +19 -0
- package/model/agravityVersion.pub.agravity.ts +24 -0
- package/model/allWebAppData.pub.agravity.ts +24 -0
- package/model/artificialIntelligenceGroup.pub.agravity.ts +20 -0
- package/model/asset.pub.agravity.ts +47 -0
- package/model/assetAvailability.pub.agravity.ts +19 -0
- package/model/assetBlob.pub.agravity.ts +82 -0
- package/model/assetIdContainer.pub.agravity.ts +18 -0
- package/model/assetPageResult.pub.agravity.ts +23 -0
- package/model/azSearchOptions.pub.agravity.ts +25 -0
- package/model/badRequestResult.pub.agravity.ts +17 -0
- package/model/collTypeItem.pub.agravity.ts +38 -0
- package/model/collection.pub.agravity.ts +35 -0
- package/model/collectionType.pub.agravity.ts +35 -0
- package/model/collectionUDL.pub.agravity.ts +21 -0
- package/model/createSftpUserResult.pub.agravity.ts +18 -0
- package/model/dataResult.pub.agravity.ts +22 -0
- package/model/distZipResponse.pub.agravity.ts +19 -0
- package/model/downloadFormat.pub.agravity.ts +34 -0
- package/model/dynamicImageOperation.pub.agravity.ts +18 -0
- package/model/entityId.pub.agravity.ts +17 -0
- package/model/entityIdName.pub.agravity.ts +19 -0
- package/model/frontendAppConfig.pub.agravity.ts +21 -0
- package/model/groupAllAppData.pub.agravity.ts +26 -0
- package/model/metadata.pub.agravity.ts +19 -0
- package/model/models.ts +44 -0
- package/model/okResult.pub.agravity.ts +17 -0
- package/model/publishEntity.pub.agravity.ts +28 -0
- package/model/publishedAsset.pub.agravity.ts +25 -0
- package/model/quickShareFull.pub.agravity.ts +36 -0
- package/model/sasToken.pub.agravity.ts +22 -0
- package/model/savedSearch.pub.agravity.ts +31 -0
- package/model/searchFacet.pub.agravity.ts +19 -0
- package/model/searchFacetEntity.pub.agravity.ts +19 -0
- package/model/searchResult.pub.agravity.ts +23 -0
- package/model/searchableItem.pub.agravity.ts +26 -0
- package/model/secureUploadEntity.pub.agravity.ts +27 -0
- package/model/sharedAsset.pub.agravity.ts +25 -0
- package/model/sharedCollectionFull.pub.agravity.ts +29 -0
- package/model/signalRConnectionInfo.pub.agravity.ts +18 -0
- package/model/staticDefinedList.pub.agravity.ts +30 -0
- package/model/versionEntity.pub.agravity.ts +28 -0
- package/model/versionedAsset.pub.agravity.ts +20 -0
- package/model/whereParam.pub.agravity.ts +43 -0
- package/model/workspace.pub.agravity.ts +34 -0
- package/package.json +28 -0
- package/variables.ts +9 -0
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agravity OpenAPI Documentation - Public Functions
|
|
3
|
+
* <h1>Agravity API Reference</h1>This is the public API description of Agravity GmbH.<br/><h2>Resources</h2><ul> <li>Collection type management</li> <li>Collections management</li> <li>Assets management</li> <li>Assets operations</li> <li>Assets publishing</li> <li>Collection Sharing (consume share)</li> <li>Secure Upload (validate + upload file)</li> <li>Download ZIP</li> <li>Search</li> <li>General management</li></ul><h2> Operations</h2>Agravity API performs the following operations:<ul> <li>List / get single collection types</li> <li>List / get single collections</li> <li>List / get single assets</li> <li>Operations on assets like: blobs, rotate, resize, similar, collections, customfields, download</li> <li>List / get single published asset</li> <li>Search for assets or collections</li> <li>Get version of deployment</li></ul><br/><b>API key is needed to access these endpoints.</b><br/><br/>Copyright © Agravity GmbH 2023. All Rights Reserved
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 5.2.0
|
|
6
|
+
* Contact: office@agravity.io
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/* tslint:disable:no-unused-variable member-ordering */
|
|
13
|
+
|
|
14
|
+
import { Inject, Injectable, Optional } from '@angular/core';
|
|
15
|
+
import { HttpClient, HttpHeaders, HttpParams,
|
|
16
|
+
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
|
|
17
|
+
import { CustomHttpParameterCodec } from '../encoder';
|
|
18
|
+
import { Observable } from 'rxjs';
|
|
19
|
+
|
|
20
|
+
import { AgravityErrorResponse } from '../model/models';
|
|
21
|
+
import { AssetAvailability } from '../model/models';
|
|
22
|
+
import { AssetBlob } from '../model/models';
|
|
23
|
+
import { Collection } from '../model/models';
|
|
24
|
+
import { DynamicImageOperation } from '../model/models';
|
|
25
|
+
|
|
26
|
+
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
27
|
+
import { AgravityPublicConfiguration } from '../configuration';
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@Injectable({
|
|
32
|
+
providedIn: 'root'
|
|
33
|
+
})
|
|
34
|
+
export class PublicAssetOperationsService {
|
|
35
|
+
|
|
36
|
+
protected basePath = 'http://localhost:7072/api';
|
|
37
|
+
public defaultHeaders = new HttpHeaders();
|
|
38
|
+
public configuration = new AgravityPublicConfiguration();
|
|
39
|
+
public encoder: HttpParameterCodec;
|
|
40
|
+
|
|
41
|
+
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
|
|
42
|
+
if (configuration) {
|
|
43
|
+
this.configuration = configuration;
|
|
44
|
+
}
|
|
45
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
46
|
+
if (typeof basePath !== 'string') {
|
|
47
|
+
basePath = this.basePath;
|
|
48
|
+
}
|
|
49
|
+
this.configuration.basePath = basePath;
|
|
50
|
+
}
|
|
51
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
56
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
57
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
58
|
+
} else {
|
|
59
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
60
|
+
}
|
|
61
|
+
return httpParams;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return httpParams;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (typeof value === "object") {
|
|
70
|
+
if (Array.isArray(value)) {
|
|
71
|
+
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
72
|
+
} else if (value instanceof Date) {
|
|
73
|
+
if (key != null) {
|
|
74
|
+
httpParams = httpParams.append(key,
|
|
75
|
+
(value as Date).toISOString().substr(0, 10));
|
|
76
|
+
} else {
|
|
77
|
+
throw Error("key may not be null if value is Date");
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
|
|
81
|
+
httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
82
|
+
}
|
|
83
|
+
} else if (key != null) {
|
|
84
|
+
httpParams = httpParams.append(key, value);
|
|
85
|
+
} else {
|
|
86
|
+
throw Error("key may not be null if value is not object or array");
|
|
87
|
+
}
|
|
88
|
+
return httpParams;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* This endpoint lets you resize/modify the image asset according to the given parameter(s).
|
|
93
|
+
* @param id The ID of the asset.
|
|
94
|
+
* @param width The width of the final image.
|
|
95
|
+
* @param height The height of the final image.
|
|
96
|
+
* @param mode The supported modes: contain (default), cover, fill, crop, none
|
|
97
|
+
* @param target The file type which the image should be (i.e. webp, png, jpg, gif)
|
|
98
|
+
* @param bgcolor The color of the background color if background is visible (crop outside, png). RGB(A) in hex code (i.e. 00FFAA or with alpha channel: 44AABB77) and color names (i.e. lightgray) supported - default: transparent
|
|
99
|
+
* @param dpi The density (counts for X and Y) of the target image.
|
|
100
|
+
* @param depth The bit depth of the target image.
|
|
101
|
+
* @param quality The quality of the target image (1-100).
|
|
102
|
+
* @param colorspace The color space of the image (Default: sRGB).
|
|
103
|
+
* @param cropX If mode is crop: The x coordinate of the point (if image is extended (outside) it is negative)
|
|
104
|
+
* @param cropY If mode is crop: The y coordinate of the point (if image is extended (outside) it is negative)
|
|
105
|
+
* @param cropWidth If mode=crop: The width of the cropping rectangle (from original pixel)
|
|
106
|
+
* @param cropHeight If mode=crop: The height of the cropping rectangle (from original pixel)
|
|
107
|
+
* @param filter Which filter should be applied. To get all filters available use: /api/helper/imageeditfilters
|
|
108
|
+
* @param original If set to true the internal image is used instead of the default original
|
|
109
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
110
|
+
* @param reportProgress flag to report request and response progress.
|
|
111
|
+
*/
|
|
112
|
+
public httpAssetImageEdit(id: string, width?: number, height?: number, mode?: string, target?: string, bgcolor?: string, dpi?: number, depth?: number, quality?: number, colorspace?: string, cropX?: number, cropY?: number, cropWidth?: number, cropHeight?: number, filter?: string, original?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<Blob>;
|
|
113
|
+
public httpAssetImageEdit(id: string, width?: number, height?: number, mode?: string, target?: string, bgcolor?: string, dpi?: number, depth?: number, quality?: number, colorspace?: string, cropX?: number, cropY?: number, cropWidth?: number, cropHeight?: number, filter?: string, original?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpResponse<Blob>>;
|
|
114
|
+
public httpAssetImageEdit(id: string, width?: number, height?: number, mode?: string, target?: string, bgcolor?: string, dpi?: number, depth?: number, quality?: number, colorspace?: string, cropX?: number, cropY?: number, cropWidth?: number, cropHeight?: number, filter?: string, original?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpEvent<Blob>>;
|
|
115
|
+
public httpAssetImageEdit(id: string, width?: number, height?: number, mode?: string, target?: string, bgcolor?: string, dpi?: number, depth?: number, quality?: number, colorspace?: string, cropX?: number, cropY?: number, cropWidth?: number, cropHeight?: number, filter?: string, original?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<any> {
|
|
116
|
+
if (id === null || id === undefined) {
|
|
117
|
+
throw new Error('Required parameter id was null or undefined when calling httpAssetImageEdit.');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
121
|
+
if (width !== undefined && width !== null) {
|
|
122
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
123
|
+
<any>width, 'width');
|
|
124
|
+
}
|
|
125
|
+
if (height !== undefined && height !== null) {
|
|
126
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
127
|
+
<any>height, 'height');
|
|
128
|
+
}
|
|
129
|
+
if (mode !== undefined && mode !== null) {
|
|
130
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
131
|
+
<any>mode, 'mode');
|
|
132
|
+
}
|
|
133
|
+
if (target !== undefined && target !== null) {
|
|
134
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
135
|
+
<any>target, 'target');
|
|
136
|
+
}
|
|
137
|
+
if (bgcolor !== undefined && bgcolor !== null) {
|
|
138
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
139
|
+
<any>bgcolor, 'bgcolor');
|
|
140
|
+
}
|
|
141
|
+
if (dpi !== undefined && dpi !== null) {
|
|
142
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
143
|
+
<any>dpi, 'dpi');
|
|
144
|
+
}
|
|
145
|
+
if (depth !== undefined && depth !== null) {
|
|
146
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
147
|
+
<any>depth, 'depth');
|
|
148
|
+
}
|
|
149
|
+
if (quality !== undefined && quality !== null) {
|
|
150
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
151
|
+
<any>quality, 'quality');
|
|
152
|
+
}
|
|
153
|
+
if (colorspace !== undefined && colorspace !== null) {
|
|
154
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
155
|
+
<any>colorspace, 'colorspace');
|
|
156
|
+
}
|
|
157
|
+
if (cropX !== undefined && cropX !== null) {
|
|
158
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
159
|
+
<any>cropX, 'crop_x');
|
|
160
|
+
}
|
|
161
|
+
if (cropY !== undefined && cropY !== null) {
|
|
162
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
163
|
+
<any>cropY, 'crop_y');
|
|
164
|
+
}
|
|
165
|
+
if (cropWidth !== undefined && cropWidth !== null) {
|
|
166
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
167
|
+
<any>cropWidth, 'crop_width');
|
|
168
|
+
}
|
|
169
|
+
if (cropHeight !== undefined && cropHeight !== null) {
|
|
170
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
171
|
+
<any>cropHeight, 'crop_height');
|
|
172
|
+
}
|
|
173
|
+
if (filter !== undefined && filter !== null) {
|
|
174
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
175
|
+
<any>filter, 'filter');
|
|
176
|
+
}
|
|
177
|
+
if (original !== undefined && original !== null) {
|
|
178
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
179
|
+
<any>original, 'original');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
let headers = this.defaultHeaders;
|
|
183
|
+
|
|
184
|
+
let credential: string | undefined;
|
|
185
|
+
// authentication (function_key) required
|
|
186
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
187
|
+
if (credential) {
|
|
188
|
+
headers = headers.set('x-functions-key', credential);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
192
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
193
|
+
// to determine the Accept header
|
|
194
|
+
const httpHeaderAccepts: string[] = [
|
|
195
|
+
'image/xyz',
|
|
196
|
+
'application/json'
|
|
197
|
+
];
|
|
198
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
199
|
+
}
|
|
200
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
201
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
return this.httpClient.get(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/imageedit`,
|
|
206
|
+
{
|
|
207
|
+
params: queryParameters,
|
|
208
|
+
responseType: "blob",
|
|
209
|
+
withCredentials: this.configuration.withCredentials,
|
|
210
|
+
headers: headers,
|
|
211
|
+
observe: observe,
|
|
212
|
+
reportProgress: reportProgress
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* This endpoint lets you resize/modify the image asset according to the given parameter(s).
|
|
219
|
+
* @param id The ID of the asset.
|
|
220
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
221
|
+
* @param reportProgress flag to report request and response progress.
|
|
222
|
+
*/
|
|
223
|
+
public httpAssetResize(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<Blob>;
|
|
224
|
+
public httpAssetResize(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpResponse<Blob>>;
|
|
225
|
+
public httpAssetResize(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpEvent<Blob>>;
|
|
226
|
+
public httpAssetResize(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<any> {
|
|
227
|
+
if (id === null || id === undefined) {
|
|
228
|
+
throw new Error('Required parameter id was null or undefined when calling httpAssetResize.');
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
let headers = this.defaultHeaders;
|
|
232
|
+
|
|
233
|
+
let credential: string | undefined;
|
|
234
|
+
// authentication (function_key) required
|
|
235
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
236
|
+
if (credential) {
|
|
237
|
+
headers = headers.set('x-functions-key', credential);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
241
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
242
|
+
// to determine the Accept header
|
|
243
|
+
const httpHeaderAccepts: string[] = [
|
|
244
|
+
'image/xyz',
|
|
245
|
+
'application/json'
|
|
246
|
+
];
|
|
247
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
248
|
+
}
|
|
249
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
250
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
return this.httpClient.get(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/resize`,
|
|
255
|
+
{
|
|
256
|
+
responseType: "blob",
|
|
257
|
+
withCredentials: this.configuration.withCredentials,
|
|
258
|
+
headers: headers,
|
|
259
|
+
observe: observe,
|
|
260
|
+
reportProgress: reportProgress
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* This endpoint checks, if an asset exists and returns the url for the requested blob.
|
|
267
|
+
* @param id The ID of the asset.
|
|
268
|
+
* @param c \"t\" for thumbnail (default); \"o\" for optimized; \"i\" for internal.
|
|
269
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
270
|
+
* @param reportProgress flag to report request and response progress.
|
|
271
|
+
*/
|
|
272
|
+
public httpGetAssetBlob(id: string, c: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AssetBlob>;
|
|
273
|
+
public httpGetAssetBlob(id: string, c: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AssetBlob>>;
|
|
274
|
+
public httpGetAssetBlob(id: string, c: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AssetBlob>>;
|
|
275
|
+
public httpGetAssetBlob(id: string, c: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
276
|
+
if (id === null || id === undefined) {
|
|
277
|
+
throw new Error('Required parameter id was null or undefined when calling httpGetAssetBlob.');
|
|
278
|
+
}
|
|
279
|
+
if (c === null || c === undefined) {
|
|
280
|
+
throw new Error('Required parameter c was null or undefined when calling httpGetAssetBlob.');
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
284
|
+
if (c !== undefined && c !== null) {
|
|
285
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
286
|
+
<any>c, 'c');
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
let headers = this.defaultHeaders;
|
|
290
|
+
|
|
291
|
+
let credential: string | undefined;
|
|
292
|
+
// authentication (function_key) required
|
|
293
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
294
|
+
if (credential) {
|
|
295
|
+
headers = headers.set('x-functions-key', credential);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
299
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
300
|
+
// to determine the Accept header
|
|
301
|
+
const httpHeaderAccepts: string[] = [
|
|
302
|
+
'application/json'
|
|
303
|
+
];
|
|
304
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
305
|
+
}
|
|
306
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
307
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
312
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
313
|
+
responseType_ = 'text';
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
return this.httpClient.get<AssetBlob>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/blobs`,
|
|
317
|
+
{
|
|
318
|
+
params: queryParameters,
|
|
319
|
+
responseType: <any>responseType_,
|
|
320
|
+
withCredentials: this.configuration.withCredentials,
|
|
321
|
+
headers: headers,
|
|
322
|
+
observe: observe,
|
|
323
|
+
reportProgress: reportProgress
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Returns all collections of a specific asset.
|
|
330
|
+
* @param id The ID of the asset.
|
|
331
|
+
* @param fields This limits the fields which are returned, separated by comma (\',\').
|
|
332
|
+
* @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header)
|
|
333
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
334
|
+
* @param reportProgress flag to report request and response progress.
|
|
335
|
+
*/
|
|
336
|
+
public httpGetAssetCollectionsById(id: string, fields?: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<Collection>>;
|
|
337
|
+
public httpGetAssetCollectionsById(id: string, fields?: string, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<Collection>>>;
|
|
338
|
+
public httpGetAssetCollectionsById(id: string, fields?: string, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<Collection>>>;
|
|
339
|
+
public httpGetAssetCollectionsById(id: string, fields?: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
340
|
+
if (id === null || id === undefined) {
|
|
341
|
+
throw new Error('Required parameter id was null or undefined when calling httpGetAssetCollectionsById.');
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
345
|
+
if (fields !== undefined && fields !== null) {
|
|
346
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
347
|
+
<any>fields, 'fields');
|
|
348
|
+
}
|
|
349
|
+
if (translations !== undefined && translations !== null) {
|
|
350
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
351
|
+
<any>translations, 'translations');
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
let headers = this.defaultHeaders;
|
|
355
|
+
|
|
356
|
+
let credential: string | undefined;
|
|
357
|
+
// authentication (function_key) required
|
|
358
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
359
|
+
if (credential) {
|
|
360
|
+
headers = headers.set('x-functions-key', credential);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
364
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
365
|
+
// to determine the Accept header
|
|
366
|
+
const httpHeaderAccepts: string[] = [
|
|
367
|
+
'application/json'
|
|
368
|
+
];
|
|
369
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
370
|
+
}
|
|
371
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
372
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
377
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
378
|
+
responseType_ = 'text';
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return this.httpClient.get<Array<Collection>>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/collections`,
|
|
382
|
+
{
|
|
383
|
+
params: queryParameters,
|
|
384
|
+
responseType: <any>responseType_,
|
|
385
|
+
withCredentials: this.configuration.withCredentials,
|
|
386
|
+
headers: headers,
|
|
387
|
+
observe: observe,
|
|
388
|
+
reportProgress: reportProgress
|
|
389
|
+
}
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* This endpoint is similar to GetAssetBlob but with ContentDistribution and filename to let browser download the content.
|
|
395
|
+
* @param id The ID of the asset.
|
|
396
|
+
* @param c \"t\" for thumbnail (default); \"o\" for optimized; \"i\" for internal.
|
|
397
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
398
|
+
* @param reportProgress flag to report request and response progress.
|
|
399
|
+
*/
|
|
400
|
+
public httpGetAssetDownload(id: string, c?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AssetBlob>;
|
|
401
|
+
public httpGetAssetDownload(id: string, c?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AssetBlob>>;
|
|
402
|
+
public httpGetAssetDownload(id: string, c?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AssetBlob>>;
|
|
403
|
+
public httpGetAssetDownload(id: string, c?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
404
|
+
if (id === null || id === undefined) {
|
|
405
|
+
throw new Error('Required parameter id was null or undefined when calling httpGetAssetDownload.');
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
409
|
+
if (c !== undefined && c !== null) {
|
|
410
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
411
|
+
<any>c, 'c');
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
let headers = this.defaultHeaders;
|
|
415
|
+
|
|
416
|
+
let credential: string | undefined;
|
|
417
|
+
// authentication (function_key) required
|
|
418
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
419
|
+
if (credential) {
|
|
420
|
+
headers = headers.set('x-functions-key', credential);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
424
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
425
|
+
// to determine the Accept header
|
|
426
|
+
const httpHeaderAccepts: string[] = [
|
|
427
|
+
'application/json'
|
|
428
|
+
];
|
|
429
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
430
|
+
}
|
|
431
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
432
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
437
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
438
|
+
responseType_ = 'text';
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return this.httpClient.get<AssetBlob>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/download`,
|
|
442
|
+
{
|
|
443
|
+
params: queryParameters,
|
|
444
|
+
responseType: <any>responseType_,
|
|
445
|
+
withCredentials: this.configuration.withCredentials,
|
|
446
|
+
headers: headers,
|
|
447
|
+
observe: observe,
|
|
448
|
+
reportProgress: reportProgress
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* This endpoint lets you use the entire api of Imagemagick to edit the image.
|
|
455
|
+
* @param id The ID of the asset.
|
|
456
|
+
* @param dynamicImageOperation Operations to be performed on the image directly mapped to c# imagemagick sdk
|
|
457
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
458
|
+
* @param reportProgress flag to report request and response progress.
|
|
459
|
+
*/
|
|
460
|
+
public httpImageDynamicEdit(id: string, dynamicImageOperation: Array<DynamicImageOperation>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<Blob>;
|
|
461
|
+
public httpImageDynamicEdit(id: string, dynamicImageOperation: Array<DynamicImageOperation>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpResponse<Blob>>;
|
|
462
|
+
public httpImageDynamicEdit(id: string, dynamicImageOperation: Array<DynamicImageOperation>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpEvent<Blob>>;
|
|
463
|
+
public httpImageDynamicEdit(id: string, dynamicImageOperation: Array<DynamicImageOperation>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<any> {
|
|
464
|
+
if (id === null || id === undefined) {
|
|
465
|
+
throw new Error('Required parameter id was null or undefined when calling httpImageDynamicEdit.');
|
|
466
|
+
}
|
|
467
|
+
if (dynamicImageOperation === null || dynamicImageOperation === undefined) {
|
|
468
|
+
throw new Error('Required parameter dynamicImageOperation was null or undefined when calling httpImageDynamicEdit.');
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
let headers = this.defaultHeaders;
|
|
472
|
+
|
|
473
|
+
let credential: string | undefined;
|
|
474
|
+
// authentication (function_key) required
|
|
475
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
476
|
+
if (credential) {
|
|
477
|
+
headers = headers.set('x-functions-key', credential);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
481
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
482
|
+
// to determine the Accept header
|
|
483
|
+
const httpHeaderAccepts: string[] = [
|
|
484
|
+
'image/xyz',
|
|
485
|
+
'application/json'
|
|
486
|
+
];
|
|
487
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
488
|
+
}
|
|
489
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
490
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
// to determine the Content-Type header
|
|
495
|
+
const consumes: string[] = [
|
|
496
|
+
'application/json'
|
|
497
|
+
];
|
|
498
|
+
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
499
|
+
if (httpContentTypeSelected !== undefined) {
|
|
500
|
+
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return this.httpClient.post(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/imageedit`,
|
|
504
|
+
dynamicImageOperation,
|
|
505
|
+
{
|
|
506
|
+
responseType: "blob",
|
|
507
|
+
withCredentials: this.configuration.withCredentials,
|
|
508
|
+
headers: headers,
|
|
509
|
+
observe: observe,
|
|
510
|
+
reportProgress: reportProgress
|
|
511
|
+
}
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* This endpoint returns an image with the requested download format applied.
|
|
517
|
+
* @param id The ID of the asset.
|
|
518
|
+
* @param downloadFormatId The ID of the download format.
|
|
519
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
520
|
+
* @param reportProgress flag to report request and response progress.
|
|
521
|
+
*/
|
|
522
|
+
public httpImageDynamicGetFromDownloadId(id: string, downloadFormatId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<Blob>;
|
|
523
|
+
public httpImageDynamicGetFromDownloadId(id: string, downloadFormatId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpResponse<Blob>>;
|
|
524
|
+
public httpImageDynamicGetFromDownloadId(id: string, downloadFormatId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<HttpEvent<Blob>>;
|
|
525
|
+
public httpImageDynamicGetFromDownloadId(id: string, downloadFormatId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'image/xyz' | 'application/json'}): Observable<any> {
|
|
526
|
+
if (id === null || id === undefined) {
|
|
527
|
+
throw new Error('Required parameter id was null or undefined when calling httpImageDynamicGetFromDownloadId.');
|
|
528
|
+
}
|
|
529
|
+
if (downloadFormatId === null || downloadFormatId === undefined) {
|
|
530
|
+
throw new Error('Required parameter downloadFormatId was null or undefined when calling httpImageDynamicGetFromDownloadId.');
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
let headers = this.defaultHeaders;
|
|
534
|
+
|
|
535
|
+
let credential: string | undefined;
|
|
536
|
+
// authentication (function_key) required
|
|
537
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
538
|
+
if (credential) {
|
|
539
|
+
headers = headers.set('x-functions-key', credential);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
543
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
544
|
+
// to determine the Accept header
|
|
545
|
+
const httpHeaderAccepts: string[] = [
|
|
546
|
+
'image/xyz',
|
|
547
|
+
'application/json'
|
|
548
|
+
];
|
|
549
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
550
|
+
}
|
|
551
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
552
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
return this.httpClient.get(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/imageedit/${encodeURIComponent(String(downloadFormatId))}`,
|
|
557
|
+
{
|
|
558
|
+
responseType: "blob",
|
|
559
|
+
withCredentials: this.configuration.withCredentials,
|
|
560
|
+
headers: headers,
|
|
561
|
+
observe: observe,
|
|
562
|
+
reportProgress: reportProgress
|
|
563
|
+
}
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* This endpoint sets the availability of the asset. All properties are put on the asset and replace previous values.To make an asset unavailable set the `availability` property to \'locked\' or set the `available_from` property below the current date. To make it available set empty string to `availability` property or `available_to` property into past.
|
|
569
|
+
* @param id The ID of the asset.
|
|
570
|
+
* @param assetAvailability The values are validated and put directly on the asset.
|
|
571
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
572
|
+
* @param reportProgress flag to report request and response progress.
|
|
573
|
+
*/
|
|
574
|
+
public httpPutAssetAvailability(id: string, assetAvailability: AssetAvailability, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AssetAvailability>;
|
|
575
|
+
public httpPutAssetAvailability(id: string, assetAvailability: AssetAvailability, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AssetAvailability>>;
|
|
576
|
+
public httpPutAssetAvailability(id: string, assetAvailability: AssetAvailability, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AssetAvailability>>;
|
|
577
|
+
public httpPutAssetAvailability(id: string, assetAvailability: AssetAvailability, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
578
|
+
if (id === null || id === undefined) {
|
|
579
|
+
throw new Error('Required parameter id was null or undefined when calling httpPutAssetAvailability.');
|
|
580
|
+
}
|
|
581
|
+
if (assetAvailability === null || assetAvailability === undefined) {
|
|
582
|
+
throw new Error('Required parameter assetAvailability was null or undefined when calling httpPutAssetAvailability.');
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
let headers = this.defaultHeaders;
|
|
586
|
+
|
|
587
|
+
let credential: string | undefined;
|
|
588
|
+
// authentication (function_key) required
|
|
589
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
590
|
+
if (credential) {
|
|
591
|
+
headers = headers.set('x-functions-key', credential);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
595
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
596
|
+
// to determine the Accept header
|
|
597
|
+
const httpHeaderAccepts: string[] = [
|
|
598
|
+
'application/json'
|
|
599
|
+
];
|
|
600
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
601
|
+
}
|
|
602
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
603
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
// to determine the Content-Type header
|
|
608
|
+
const consumes: string[] = [
|
|
609
|
+
'application/json'
|
|
610
|
+
];
|
|
611
|
+
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
612
|
+
if (httpContentTypeSelected !== undefined) {
|
|
613
|
+
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
617
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
618
|
+
responseType_ = 'text';
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
return this.httpClient.put<AssetAvailability>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/availability`,
|
|
622
|
+
assetAvailability,
|
|
623
|
+
{
|
|
624
|
+
responseType: <any>responseType_,
|
|
625
|
+
withCredentials: this.configuration.withCredentials,
|
|
626
|
+
headers: headers,
|
|
627
|
+
observe: observe,
|
|
628
|
+
reportProgress: reportProgress
|
|
629
|
+
}
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
}
|