@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,148 @@
|
|
|
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 { PublishEntity } 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 PublicPublishingService {
|
|
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
|
+
* This endpoint lists all the published assets which are stored in the database
|
|
89
|
+
* @param cid Filter response for collection
|
|
90
|
+
* @param incldescendants Include collections further down in hierarchy
|
|
91
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
92
|
+
* @param reportProgress flag to report request and response progress.
|
|
93
|
+
*/
|
|
94
|
+
public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<PublishEntity>;
|
|
95
|
+
public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<PublishEntity>>;
|
|
96
|
+
public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<PublishEntity>>;
|
|
97
|
+
public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
98
|
+
|
|
99
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
100
|
+
if (cid !== undefined && cid !== null) {
|
|
101
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
102
|
+
<any>cid, 'cid');
|
|
103
|
+
}
|
|
104
|
+
if (incldescendants !== undefined && incldescendants !== null) {
|
|
105
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
106
|
+
<any>incldescendants, 'incldescendants');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
let headers = this.defaultHeaders;
|
|
110
|
+
|
|
111
|
+
let credential: string | undefined;
|
|
112
|
+
// authentication (function_key) required
|
|
113
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
114
|
+
if (credential) {
|
|
115
|
+
headers = headers.set('x-functions-key', credential);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
119
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
120
|
+
// to determine the Accept header
|
|
121
|
+
const httpHeaderAccepts: string[] = [
|
|
122
|
+
'application/json'
|
|
123
|
+
];
|
|
124
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
125
|
+
}
|
|
126
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
127
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
132
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
133
|
+
responseType_ = 'text';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return this.httpClient.get<PublishEntity>(`${this.configuration.basePath}/publish`,
|
|
137
|
+
{
|
|
138
|
+
params: queryParameters,
|
|
139
|
+
responseType: <any>responseType_,
|
|
140
|
+
withCredentials: this.configuration.withCredentials,
|
|
141
|
+
headers: headers,
|
|
142
|
+
observe: observe,
|
|
143
|
+
reportProgress: reportProgress
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
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 { SavedSearch } 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 PublicSavedSearchService {
|
|
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
|
+
* This endpoint lists all saved searches in database.
|
|
89
|
+
* @param external This parameter filters out all saved searches on basis this boolean.
|
|
90
|
+
* @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header)
|
|
91
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
92
|
+
* @param reportProgress flag to report request and response progress.
|
|
93
|
+
*/
|
|
94
|
+
public httpSavedSearchesGetAll(external?: boolean, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<SavedSearch>>;
|
|
95
|
+
public httpSavedSearchesGetAll(external?: boolean, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<SavedSearch>>>;
|
|
96
|
+
public httpSavedSearchesGetAll(external?: boolean, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<SavedSearch>>>;
|
|
97
|
+
public httpSavedSearchesGetAll(external?: boolean, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
98
|
+
|
|
99
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
100
|
+
if (external !== undefined && external !== null) {
|
|
101
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
102
|
+
<any>external, 'external');
|
|
103
|
+
}
|
|
104
|
+
if (translations !== undefined && translations !== null) {
|
|
105
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
106
|
+
<any>translations, 'translations');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
let headers = this.defaultHeaders;
|
|
110
|
+
|
|
111
|
+
let credential: string | undefined;
|
|
112
|
+
// authentication (function_key) required
|
|
113
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
114
|
+
if (credential) {
|
|
115
|
+
headers = headers.set('x-functions-key', credential);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
119
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
120
|
+
// to determine the Accept header
|
|
121
|
+
const httpHeaderAccepts: string[] = [
|
|
122
|
+
'application/json'
|
|
123
|
+
];
|
|
124
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
125
|
+
}
|
|
126
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
127
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
132
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
133
|
+
responseType_ = 'text';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return this.httpClient.get<Array<SavedSearch>>(`${this.configuration.basePath}/savedsearches`,
|
|
137
|
+
{
|
|
138
|
+
params: queryParameters,
|
|
139
|
+
responseType: <any>responseType_,
|
|
140
|
+
withCredentials: this.configuration.withCredentials,
|
|
141
|
+
headers: headers,
|
|
142
|
+
observe: observe,
|
|
143
|
+
reportProgress: reportProgress
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
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 { SearchResult } from '../model/models';
|
|
22
|
+
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
24
|
+
import { AgravityPublicConfiguration } from '../configuration';
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@Injectable({
|
|
29
|
+
providedIn: 'root'
|
|
30
|
+
})
|
|
31
|
+
export class PublicSearchManagementService {
|
|
32
|
+
|
|
33
|
+
protected basePath = 'http://localhost:7072/api';
|
|
34
|
+
public defaultHeaders = new HttpHeaders();
|
|
35
|
+
public configuration = new AgravityPublicConfiguration();
|
|
36
|
+
public encoder: HttpParameterCodec;
|
|
37
|
+
|
|
38
|
+
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
|
|
39
|
+
if (configuration) {
|
|
40
|
+
this.configuration = configuration;
|
|
41
|
+
}
|
|
42
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
43
|
+
if (typeof basePath !== 'string') {
|
|
44
|
+
basePath = this.basePath;
|
|
45
|
+
}
|
|
46
|
+
this.configuration.basePath = basePath;
|
|
47
|
+
}
|
|
48
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
53
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
54
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
55
|
+
} else {
|
|
56
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
57
|
+
}
|
|
58
|
+
return httpParams;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return httpParams;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (typeof value === "object") {
|
|
67
|
+
if (Array.isArray(value)) {
|
|
68
|
+
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
69
|
+
} else if (value instanceof Date) {
|
|
70
|
+
if (key != null) {
|
|
71
|
+
httpParams = httpParams.append(key,
|
|
72
|
+
(value as Date).toISOString().substr(0, 10));
|
|
73
|
+
} else {
|
|
74
|
+
throw Error("key may not be null if value is Date");
|
|
75
|
+
}
|
|
76
|
+
} else {
|
|
77
|
+
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
|
|
78
|
+
httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
79
|
+
}
|
|
80
|
+
} else if (key != null) {
|
|
81
|
+
httpParams = httpParams.append(key, value);
|
|
82
|
+
} else {
|
|
83
|
+
throw Error("key may not be null if value is not object or array");
|
|
84
|
+
}
|
|
85
|
+
return httpParams;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* This endpoint returns a configured max amount of results for search terms.
|
|
90
|
+
* @param s The search string which should be found.
|
|
91
|
+
* @param limit How many results should be returend. 0 is backend configuration limit.
|
|
92
|
+
* @param skip (default: 0) - Used for paging - how many items should be skipped before next limit results will be fetched.
|
|
93
|
+
* @param collectiontypeid Limits the result on all collections from the given collectiontypeid parameter.
|
|
94
|
+
* @param collectionid Limits the result on collection id (and siblings). Will be overwritten by collectiontypeid parameter.
|
|
95
|
+
* @param mode Two modes supported: \"any\" or \"all\" search terms should be applied. (Only if Azure Search is enabled)
|
|
96
|
+
* @param expose This will expose the thumbnail asset blob incl. URL with SAS Token.
|
|
97
|
+
* @param filter Colon separated key value filter for filterable strings and string collections. For date or numbers \"<\", \"=\" and \">\" are possible. Mode influences AND (all) and OR (any) of all filters. Multiple filters are separated by semicolons. (Only if Azure Search is enabled)
|
|
98
|
+
* @param orderby Sortable fields can be used. For descendant sorting use leading \"!\". (Only if Azure Search is enabled)
|
|
99
|
+
* @param ids Comma separated values list with all ids which should be returned.
|
|
100
|
+
* @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header)
|
|
101
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
102
|
+
* @param reportProgress flag to report request and response progress.
|
|
103
|
+
*/
|
|
104
|
+
public httpGlobalSearch(s: string, limit?: number, skip?: number, collectiontypeid?: string, collectionid?: string, mode?: string, expose?: boolean, filter?: string, orderby?: string, ids?: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<SearchResult>;
|
|
105
|
+
public httpGlobalSearch(s: string, limit?: number, skip?: number, collectiontypeid?: string, collectionid?: string, mode?: string, expose?: boolean, filter?: string, orderby?: string, ids?: string, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<SearchResult>>;
|
|
106
|
+
public httpGlobalSearch(s: string, limit?: number, skip?: number, collectiontypeid?: string, collectionid?: string, mode?: string, expose?: boolean, filter?: string, orderby?: string, ids?: string, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<SearchResult>>;
|
|
107
|
+
public httpGlobalSearch(s: string, limit?: number, skip?: number, collectiontypeid?: string, collectionid?: string, mode?: string, expose?: boolean, filter?: string, orderby?: string, ids?: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
|
|
108
|
+
if (s === null || s === undefined) {
|
|
109
|
+
throw new Error('Required parameter s was null or undefined when calling httpGlobalSearch.');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let queryParameters = new HttpParams({encoder: this.encoder});
|
|
113
|
+
if (s !== undefined && s !== null) {
|
|
114
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
115
|
+
<any>s, 's');
|
|
116
|
+
}
|
|
117
|
+
if (limit !== undefined && limit !== null) {
|
|
118
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
119
|
+
<any>limit, 'limit');
|
|
120
|
+
}
|
|
121
|
+
if (skip !== undefined && skip !== null) {
|
|
122
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
123
|
+
<any>skip, 'skip');
|
|
124
|
+
}
|
|
125
|
+
if (collectiontypeid !== undefined && collectiontypeid !== null) {
|
|
126
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
127
|
+
<any>collectiontypeid, 'collectiontypeid');
|
|
128
|
+
}
|
|
129
|
+
if (collectionid !== undefined && collectionid !== null) {
|
|
130
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
131
|
+
<any>collectionid, 'collectionid');
|
|
132
|
+
}
|
|
133
|
+
if (mode !== undefined && mode !== null) {
|
|
134
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
135
|
+
<any>mode, 'mode');
|
|
136
|
+
}
|
|
137
|
+
if (expose !== undefined && expose !== null) {
|
|
138
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
139
|
+
<any>expose, 'expose');
|
|
140
|
+
}
|
|
141
|
+
if (filter !== undefined && filter !== null) {
|
|
142
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
143
|
+
<any>filter, 'filter');
|
|
144
|
+
}
|
|
145
|
+
if (orderby !== undefined && orderby !== null) {
|
|
146
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
147
|
+
<any>orderby, 'orderby');
|
|
148
|
+
}
|
|
149
|
+
if (ids !== undefined && ids !== null) {
|
|
150
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
151
|
+
<any>ids, 'ids');
|
|
152
|
+
}
|
|
153
|
+
if (translations !== undefined && translations !== null) {
|
|
154
|
+
queryParameters = this.addToHttpParams(queryParameters,
|
|
155
|
+
<any>translations, 'translations');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
let headers = this.defaultHeaders;
|
|
159
|
+
|
|
160
|
+
let credential: string | undefined;
|
|
161
|
+
// authentication (function_key) required
|
|
162
|
+
credential = this.configuration.lookupCredential('function_key');
|
|
163
|
+
if (credential) {
|
|
164
|
+
headers = headers.set('x-functions-key', credential);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
|
|
168
|
+
if (httpHeaderAcceptSelected === undefined) {
|
|
169
|
+
// to determine the Accept header
|
|
170
|
+
const httpHeaderAccepts: string[] = [
|
|
171
|
+
'application/json'
|
|
172
|
+
];
|
|
173
|
+
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
174
|
+
}
|
|
175
|
+
if (httpHeaderAcceptSelected !== undefined) {
|
|
176
|
+
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
let responseType_: 'text' | 'json' = 'json';
|
|
181
|
+
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
|
|
182
|
+
responseType_ = 'text';
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return this.httpClient.get<SearchResult>(`${this.configuration.basePath}/search`,
|
|
186
|
+
{
|
|
187
|
+
params: queryParameters,
|
|
188
|
+
responseType: <any>responseType_,
|
|
189
|
+
withCredentials: this.configuration.withCredentials,
|
|
190
|
+
headers: headers,
|
|
191
|
+
observe: observe,
|
|
192
|
+
reportProgress: reportProgress
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
}
|