@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,229 @@
|
|
|
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 { Asset } from '../model/models';
|
|
22
|
+
import { SecureUploadEntity } from '../model/models';
|
|
23
|
+
|
|
24
|
+
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
25
|
+
import { AgravityPublicConfiguration } from '../configuration';
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@Injectable({
|
|
30
|
+
providedIn: 'root'
|
|
31
|
+
})
|
|
32
|
+
export class PublicCollectionSecureUploadService {
|
|
33
|
+
|
|
34
|
+
protected basePath = 'http://localhost:7072/api';
|
|
35
|
+
public defaultHeaders = new HttpHeaders();
|
|
36
|
+
public configuration = new AgravityPublicConfiguration();
|
|
37
|
+
public encoder: HttpParameterCodec;
|
|
38
|
+
|
|
39
|
+
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
|
|
40
|
+
if (configuration) {
|
|
41
|
+
this.configuration = configuration;
|
|
42
|
+
}
|
|
43
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
44
|
+
if (typeof basePath !== 'string') {
|
|
45
|
+
basePath = this.basePath;
|
|
46
|
+
}
|
|
47
|
+
this.configuration.basePath = basePath;
|
|
48
|
+
}
|
|
49
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
54
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
55
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
56
|
+
} else {
|
|
57
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
58
|
+
}
|
|
59
|
+
return httpParams;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return httpParams;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (typeof value === "object") {
|
|
68
|
+
if (Array.isArray(value)) {
|
|
69
|
+
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
70
|
+
} else if (value instanceof Date) {
|
|
71
|
+
if (key != null) {
|
|
72
|
+
httpParams = httpParams.append(key,
|
|
73
|
+
(value as Date).toISOString().substr(0, 10));
|
|
74
|
+
} else {
|
|
75
|
+
throw Error("key may not be null if value is Date");
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
|
|
79
|
+
httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
80
|
+
}
|
|
81
|
+
} else if (key != null) {
|
|
82
|
+
httpParams = httpParams.append(key, value);
|
|
83
|
+
} else {
|
|
84
|
+
throw Error("key may not be null if value is not object or array");
|
|
85
|
+
}
|
|
86
|
+
return httpParams;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Searchs for one single secure upload entity of an user and returns simple OK if found.
|
|
91
|
+
* @param id The ID of the secure upload collection.
|
|
92
|
+
* @param code The API key to access this endpoint. (Alternative using header x-function-keys with same value)
|
|
93
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
94
|
+
* @param reportProgress flag to report request and response progress.
|
|
95
|
+
*/
|
|
96
|
+
public httpSecureUploadEntityCheckById(id: string, code: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<SecureUploadEntity>;
|
|
97
|
+
public httpSecureUploadEntityCheckById(id: string, code: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<SecureUploadEntity>>;
|
|
98
|
+
public httpSecureUploadEntityCheckById(id: string, code: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<SecureUploadEntity>>;
|
|
99
|
+
public httpSecureUploadEntityCheckById(id: string, code: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
100
|
+
if (id === null || id === undefined) {
|
|
101
|
+
throw new Error('Required parameter id was null or undefined when calling httpSecureUploadEntityCheckById.');
|
|
102
|
+
}
|
|
103
|
+
if (code === null || code === undefined) {
|
|
104
|
+
throw new Error('Required parameter code was null or undefined when calling httpSecureUploadEntityCheckById.');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
108
|
+
if (code !== undefined && code !== null) {
|
|
109
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
110
|
+
<any>code, 'code');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
let headers = this.defaultHeaders;
|
|
114
|
+
|
|
115
|
+
let credential: string | undefined;
|
|
116
|
+
// authentication (function_key) required
|
|
117
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
118
|
+
if (credential) {
|
|
119
|
+
headers = headers.set('x-functions-key', credential);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
123
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
124
|
+
// to determine the Accept header
|
|
125
|
+
const httpHeaderAccepts: string[] = [
|
|
126
|
+
'application/json'
|
|
127
|
+
];
|
|
128
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
129
|
+
}
|
|
130
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
131
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
136
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
137
|
+
responseType_ = 'text';
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return this.httpClient.get<SecureUploadEntity>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}`,
|
|
141
|
+
{
|
|
142
|
+
params: queryParameters,
|
|
143
|
+
responseType: <any>responseType_,
|
|
144
|
+
withCredentials: this.configuration.withCredentials,
|
|
145
|
+
headers: headers,
|
|
146
|
+
observe: observe,
|
|
147
|
+
reportProgress: reportProgress
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* This endpoint allows to securly upload one asset which is put onto the storage (INBOX). Object has to be FormData (Add file).
|
|
154
|
+
* @param id The ID of the secure upload collection.
|
|
155
|
+
* @param code The API key to access this endpoint. (Alternative using header x-function-keys with same value)
|
|
156
|
+
* @param body This endpoint allows to upload one asset which is put onto the storage (INBOX). Object has to be FormData (Add file).
|
|
157
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
158
|
+
* @param reportProgress flag to report request and response progress.
|
|
159
|
+
*/
|
|
160
|
+
public httpSecureUploadFileById(id: string, code: string, body: object, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Asset>;
|
|
161
|
+
public httpSecureUploadFileById(id: string, code: string, body: object, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Asset>>;
|
|
162
|
+
public httpSecureUploadFileById(id: string, code: string, body: object, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Asset>>;
|
|
163
|
+
public httpSecureUploadFileById(id: string, code: string, body: object, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
164
|
+
if (id === null || id === undefined) {
|
|
165
|
+
throw new Error('Required parameter id was null or undefined when calling httpSecureUploadFileById.');
|
|
166
|
+
}
|
|
167
|
+
if (code === null || code === undefined) {
|
|
168
|
+
throw new Error('Required parameter code was null or undefined when calling httpSecureUploadFileById.');
|
|
169
|
+
}
|
|
170
|
+
if (body === null || body === undefined) {
|
|
171
|
+
throw new Error('Required parameter body was null or undefined when calling httpSecureUploadFileById.');
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
175
|
+
if (code !== undefined && code !== null) {
|
|
176
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
177
|
+
<any>code, 'code');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
let headers = this.defaultHeaders;
|
|
181
|
+
|
|
182
|
+
let credential: string | undefined;
|
|
183
|
+
// authentication (function_key) required
|
|
184
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
185
|
+
if (credential) {
|
|
186
|
+
headers = headers.set('x-functions-key', credential);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
190
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
191
|
+
// to determine the Accept header
|
|
192
|
+
const httpHeaderAccepts: string[] = [
|
|
193
|
+
'application/json'
|
|
194
|
+
];
|
|
195
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
196
|
+
}
|
|
197
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
198
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
// to determine the Content-Type header
|
|
203
|
+
const consumes: string[] = [
|
|
204
|
+
'application/json'
|
|
205
|
+
];
|
|
206
|
+
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
207
|
+
if (httpContentTypeSelected !== undefined) {
|
|
208
|
+
// headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
212
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
213
|
+
responseType_ = 'text';
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return this.httpClient.post<Asset>(`${this.configuration.basePath}/secureupload/${encodeURIComponent(String(id))}/upload`,
|
|
217
|
+
body,
|
|
218
|
+
{
|
|
219
|
+
params: queryParameters,
|
|
220
|
+
responseType: <any>responseType_,
|
|
221
|
+
withCredentials: this.configuration.withCredentials,
|
|
222
|
+
headers: headers,
|
|
223
|
+
observe: observe,
|
|
224
|
+
reportProgress: reportProgress
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
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 { CollTypeItem } from '../model/models';
|
|
22
|
+
import { CollectionType } from '../model/models';
|
|
23
|
+
|
|
24
|
+
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
25
|
+
import { AgravityPublicConfiguration } from '../configuration';
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@Injectable({
|
|
30
|
+
providedIn: 'root'
|
|
31
|
+
})
|
|
32
|
+
export class PublicCollectionTypeManagementService {
|
|
33
|
+
|
|
34
|
+
protected basePath = 'http://localhost:7072/api';
|
|
35
|
+
public defaultHeaders = new HttpHeaders();
|
|
36
|
+
public configuration = new AgravityPublicConfiguration();
|
|
37
|
+
public encoder: HttpParameterCodec;
|
|
38
|
+
|
|
39
|
+
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
|
|
40
|
+
if (configuration) {
|
|
41
|
+
this.configuration = configuration;
|
|
42
|
+
}
|
|
43
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
44
|
+
if (typeof basePath !== 'string') {
|
|
45
|
+
basePath = this.basePath;
|
|
46
|
+
}
|
|
47
|
+
this.configuration.basePath = basePath;
|
|
48
|
+
}
|
|
49
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
54
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
55
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
56
|
+
} else {
|
|
57
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
58
|
+
}
|
|
59
|
+
return httpParams;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return httpParams;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (typeof value === "object") {
|
|
68
|
+
if (Array.isArray(value)) {
|
|
69
|
+
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
70
|
+
} else if (value instanceof Date) {
|
|
71
|
+
if (key != null) {
|
|
72
|
+
httpParams = httpParams.append(key,
|
|
73
|
+
(value as Date).toISOString().substr(0, 10));
|
|
74
|
+
} else {
|
|
75
|
+
throw Error("key may not be null if value is Date");
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
|
|
79
|
+
httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
80
|
+
}
|
|
81
|
+
} else if (key != null) {
|
|
82
|
+
httpParams = httpParams.append(key, value);
|
|
83
|
+
} else {
|
|
84
|
+
throw Error("key may not be null if value is not object or array");
|
|
85
|
+
}
|
|
86
|
+
return httpParams;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* This lists all available collection types which are stored in the database and not deleted (status \"A\").
|
|
91
|
+
* @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header)
|
|
92
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
93
|
+
* @param reportProgress flag to report request and response progress.
|
|
94
|
+
*/
|
|
95
|
+
public httpCollectionTypesGet(translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<CollectionType>>;
|
|
96
|
+
public httpCollectionTypesGet(translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<CollectionType>>>;
|
|
97
|
+
public httpCollectionTypesGet(translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<CollectionType>>>;
|
|
98
|
+
public httpCollectionTypesGet(translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
99
|
+
|
|
100
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
101
|
+
if (translations !== undefined && translations !== null) {
|
|
102
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
103
|
+
<any>translations, 'translations');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
let headers = this.defaultHeaders;
|
|
107
|
+
|
|
108
|
+
let credential: string | undefined;
|
|
109
|
+
// authentication (function_key) required
|
|
110
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
111
|
+
if (credential) {
|
|
112
|
+
headers = headers.set('x-functions-key', credential);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
116
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
117
|
+
// to determine the Accept header
|
|
118
|
+
const httpHeaderAccepts: string[] = [
|
|
119
|
+
'application/json'
|
|
120
|
+
];
|
|
121
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
122
|
+
}
|
|
123
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
124
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
129
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
130
|
+
responseType_ = 'text';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return this.httpClient.get<Array<CollectionType>>(`${this.configuration.basePath}/collectiontypes`,
|
|
134
|
+
{
|
|
135
|
+
params: queryParameters,
|
|
136
|
+
responseType: <any>responseType_,
|
|
137
|
+
withCredentials: this.configuration.withCredentials,
|
|
138
|
+
headers: headers,
|
|
139
|
+
observe: observe,
|
|
140
|
+
reportProgress: reportProgress
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Returns one single collection type (from ID).
|
|
147
|
+
* @param id The ID of the collection type.
|
|
148
|
+
* @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header)
|
|
149
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
150
|
+
* @param reportProgress flag to report request and response progress.
|
|
151
|
+
*/
|
|
152
|
+
public httpCollectionTypesGetById(id: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<CollectionType>;
|
|
153
|
+
public httpCollectionTypesGetById(id: string, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<CollectionType>>;
|
|
154
|
+
public httpCollectionTypesGetById(id: string, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<CollectionType>>;
|
|
155
|
+
public httpCollectionTypesGetById(id: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
156
|
+
if (id === null || id === undefined) {
|
|
157
|
+
throw new Error('Required parameter id was null or undefined when calling httpCollectionTypesGetById.');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
161
|
+
if (translations !== undefined && translations !== null) {
|
|
162
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
163
|
+
<any>translations, 'translations');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
let headers = this.defaultHeaders;
|
|
167
|
+
|
|
168
|
+
let credential: string | undefined;
|
|
169
|
+
// authentication (function_key) required
|
|
170
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
171
|
+
if (credential) {
|
|
172
|
+
headers = headers.set('x-functions-key', credential);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
176
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
177
|
+
// to determine the Accept header
|
|
178
|
+
const httpHeaderAccepts: string[] = [
|
|
179
|
+
'application/json'
|
|
180
|
+
];
|
|
181
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
182
|
+
}
|
|
183
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
184
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
189
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
190
|
+
responseType_ = 'text';
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return this.httpClient.get<CollectionType>(`${this.configuration.basePath}/collectiontypes/${encodeURIComponent(String(id))}`,
|
|
194
|
+
{
|
|
195
|
+
params: queryParameters,
|
|
196
|
+
responseType: <any>responseType_,
|
|
197
|
+
withCredentials: this.configuration.withCredentials,
|
|
198
|
+
headers: headers,
|
|
199
|
+
observe: observe,
|
|
200
|
+
reportProgress: reportProgress
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* This method returns a list of collection types items.
|
|
207
|
+
* @param includeblueprint True if the blueprint items should be included.
|
|
208
|
+
* @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header)
|
|
209
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
210
|
+
* @param reportProgress flag to report request and response progress.
|
|
211
|
+
*/
|
|
212
|
+
public httpGetCollectionTypeItems(includeblueprint?: boolean, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<CollTypeItem>>;
|
|
213
|
+
public httpGetCollectionTypeItems(includeblueprint?: boolean, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<CollTypeItem>>>;
|
|
214
|
+
public httpGetCollectionTypeItems(includeblueprint?: boolean, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<CollTypeItem>>>;
|
|
215
|
+
public httpGetCollectionTypeItems(includeblueprint?: boolean, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
216
|
+
|
|
217
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
218
|
+
if (includeblueprint !== undefined && includeblueprint !== null) {
|
|
219
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
220
|
+
<any>includeblueprint, 'includeblueprint');
|
|
221
|
+
}
|
|
222
|
+
if (translations !== undefined && translations !== null) {
|
|
223
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
224
|
+
<any>translations, 'translations');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
let headers = this.defaultHeaders;
|
|
228
|
+
|
|
229
|
+
let credential: string | undefined;
|
|
230
|
+
// authentication (function_key) required
|
|
231
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
232
|
+
if (credential) {
|
|
233
|
+
headers = headers.set('x-functions-key', credential);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
237
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
238
|
+
// to determine the Accept header
|
|
239
|
+
const httpHeaderAccepts: string[] = [
|
|
240
|
+
'application/json'
|
|
241
|
+
];
|
|
242
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
243
|
+
}
|
|
244
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
245
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
250
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
251
|
+
responseType_ = 'text';
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return this.httpClient.get<Array<CollTypeItem>>(`${this.configuration.basePath}/collectiontypesitems`,
|
|
255
|
+
{
|
|
256
|
+
params: queryParameters,
|
|
257
|
+
responseType: <any>responseType_,
|
|
258
|
+
withCredentials: this.configuration.withCredentials,
|
|
259
|
+
headers: headers,
|
|
260
|
+
observe: observe,
|
|
261
|
+
reportProgress: reportProgress
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
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 { FrontendAppConfig } from '../model/models';
|
|
21
|
+
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
23
|
+
import { AgravityPublicConfiguration } from '../configuration';
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@Injectable({
|
|
28
|
+
providedIn: 'root'
|
|
29
|
+
})
|
|
30
|
+
export class PublicConfigurationManagementService {
|
|
31
|
+
|
|
32
|
+
protected basePath = 'http://localhost:7072/api';
|
|
33
|
+
public defaultHeaders = new HttpHeaders();
|
|
34
|
+
public configuration = new AgravityPublicConfiguration();
|
|
35
|
+
public encoder: HttpParameterCodec;
|
|
36
|
+
|
|
37
|
+
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
|
|
38
|
+
if (configuration) {
|
|
39
|
+
this.configuration = configuration;
|
|
40
|
+
}
|
|
41
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
42
|
+
if (typeof basePath !== 'string') {
|
|
43
|
+
basePath = this.basePath;
|
|
44
|
+
}
|
|
45
|
+
this.configuration.basePath = basePath;
|
|
46
|
+
}
|
|
47
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
52
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
53
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
54
|
+
} else {
|
|
55
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
56
|
+
}
|
|
57
|
+
return httpParams;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return httpParams;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (typeof value === "object") {
|
|
66
|
+
if (Array.isArray(value)) {
|
|
67
|
+
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
68
|
+
} else if (value instanceof Date) {
|
|
69
|
+
if (key != null) {
|
|
70
|
+
httpParams = httpParams.append(key,
|
|
71
|
+
(value as Date).toISOString().substr(0, 10));
|
|
72
|
+
} else {
|
|
73
|
+
throw Error("key may not be null if value is Date");
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
|
|
77
|
+
httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
78
|
+
}
|
|
79
|
+
} else if (key != null) {
|
|
80
|
+
httpParams = httpParams.append(key, value);
|
|
81
|
+
} else {
|
|
82
|
+
throw Error("key may not be null if value is not object or array");
|
|
83
|
+
}
|
|
84
|
+
return httpParams;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Lists config value only for frontend stored in config table
|
|
89
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
90
|
+
* @param reportProgress flag to report request and response progress.
|
|
91
|
+
*/
|
|
92
|
+
public httpConfigGetFrontendAll(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<FrontendAppConfig>>;
|
|
93
|
+
public httpConfigGetFrontendAll(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<FrontendAppConfig>>>;
|
|
94
|
+
public httpConfigGetFrontendAll(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<FrontendAppConfig>>>;
|
|
95
|
+
public httpConfigGetFrontendAll(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
96
|
+
|
|
97
|
+
let headers = this.defaultHeaders;
|
|
98
|
+
|
|
99
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
100
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
101
|
+
// to determine the Accept header
|
|
102
|
+
const httpHeaderAccepts: string[] = [
|
|
103
|
+
'application/json'
|
|
104
|
+
];
|
|
105
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
106
|
+
}
|
|
107
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
108
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
113
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
114
|
+
responseType_ = 'text';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return this.httpClient.get<Array<FrontendAppConfig>>(`${this.configuration.basePath}/config/frontend`,
|
|
118
|
+
{
|
|
119
|
+
responseType: <any>responseType_,
|
|
120
|
+
withCredentials: this.configuration.withCredentials,
|
|
121
|
+
headers: headers,
|
|
122
|
+
observe: observe,
|
|
123
|
+
reportProgress: reportProgress
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
}
|